I'm making a web app in Django that sends user an image to their email.
The way that seems most attractive to me for sending the image is in the data:uri format.
However, I tested sending this email with a data:uri image in it to my GMail account, and the email shows, but without the image!
I know that Chrome and Firefox can both open data:uri images. So it's not a browser problem. But I don't see the data:uri image in GMail at all.
Does GMail not support data:uri images? Or possibly I'm sending them wrong?
The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in Web pages as if they were external resources. It is a form of file literal or here document.
This works fine: I set two src attribute, one with data:image/png;base64 and the other with the link to the image. When you use gmail, it use the src attribute with link and when you use other client of email it use the src attribute with data:image/png;base64. Try it!. you will see.
It's not supported.
Mail clients simply remove this from your post.
Here is a good reference of what can be supported:
http://www.campaignmonitor.com/css/
Not supported. It's also blocked in other clients like Outlook.
Some reasons:
You can attach an image with the src attribute pointing to a separate part of the message using a Content ID (CID).
<img src="cid:imagecid"/>
--001a1141059012513a055a1b9499
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-ID: <imagecid>
R0lGODlhDwAPAKIEAP/ql9yuA...
--001a1141059012513a055a1b9499--
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With