Display binary data image in email content from database


I want to display an image which is in binary data format in email. I am using the following image source for the html: 

src = "EncodeHtml(data:image/png;base64," + BinaryToBase64("image_BD"))

The problem is that I can successfully view the image when I open the email in the browser or in IOS, but not in outlook or gmail.

What can be the solution for this problem? 

Best Regards,


Apparently there should be no problems with that in GMail (now).

  • What is the size of your image? base64 has a small size, Gmail and Outlook may respect that limit and the others not.

  • Check in Original message if you have the right binary.

  • Try this cid trick (annexing the images in the mail, and linking to the local file)