Encode image to base64; add image mime type for reference