now works with base64 images