Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display base64 images in gmail? [duplicate]

I'm sending base64 encoded images in a markdown newsletter to different email services from a rich text editor. Every service renders the images properly except gmail. Instead it displays the base64 string:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACLQAAAxOCAYAAAD0p7d8AA...

The main SO thread regarding this problem does not provide a solution, as can be seen in the comments of the accepted answer.

How does one display images from a data string in gmail? Is it possible to insert a transformation layer to make it work? (I can't believe gmail doesn't support this after 6 years)

like image 795
Artur Müller Romanov Avatar asked Sep 01 '25 20:09

Artur Müller Romanov


1 Answers

Gmail does not support embedded Base 64 images (see Can I email). I believe this is for general security reasons. You either need to generate your image server side. Or send it as an attachment (like in the other post you mentioned).

like image 169
HTeuMeuLeu Avatar answered Sep 05 '25 06:09

HTeuMeuLeu