handle base64 images. Fixes #39