Can you send images in data:uri format to GMail?

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:

  • help avoid viewing potentially offensive material
  • with low-bandwidth connections, blocking inline images allows the client to decide whether a particular image warrants the time and bandwidth required to download it

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--