Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send a base64 image in HTML email

Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit.

Since the image is not uploaded anywhere, the editor saves the image as a base64-encoded image.

<img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAFKCAIAAADKUQaBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAP+lSURBVHhepP1p32zb 

etc.

But it doesn't show up - not on the iPhone, nor two different versions of Outlook. The image is simply broken. We want to stick with base64 due to it already working with the web page and the ability to view an image if the user is offline.

like image 290
Vael Victus Avatar asked Apr 26 '13 17:04

Vael Victus


People also ask

Can you send base64 image in email?

Inline embedding, or base64 images in emails Another way to display an image in the body of your message is to embed base64 image in HTML. It also refers to the MIME standard but here you don't need to worry much about it. Base64 is a group of similar binary-to-text encoding schemes.

How do you send an image in HTML email?

To attach an image, you need to have the encoding scheme of the image you want to attach. This is the base64 string of the picture. You can get this by right-clicking on the image you want to attach, copy the image address, and paste it into the HTML text.

How do you call base64 image in HTML?

Images encoded with Base64 can be embedded in HTML by using the <img> tag. This can help to increase the page load time for smaller images by saving the browser from making additional HTTP requests.

Does Outlook support base64 images?

We are using SendGrid to send emails to the Outlook platform. But, designed the email template using SendGrid dynamic template. We have a base64 image and we used it in the email template.


1 Answers

Support, unfortunately, is brutal at best. Here's a post on the topic:

https://www.campaignmonitor.com/blog/email-marketing/2013/02/embedded-images-in-html-email/

And the post content: enter image description here

like image 176
Chords Avatar answered Sep 19 '22 11:09

Chords