# Render HTML Base64 images

**URL:** <https://forum.uipath.com/t/render-html-base64-images/740997>\
**Category:** Studio\
**Tags:** mail, activities\
**Created:** [May 14, 2024, 10:44pm UTC](https://forum.uipath.com/t/render-html-base64-images/740997 "2024-05-14T22:44:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig.norton](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/craig.norton/32/268026_2.png) [@craig.norton](https://forum.uipath.com/u/craig.norton)\
**Post date:** [May 14, 2024, 10:44pm UTC](https://forum.uipath.com/t/render-html-base64-images/740997/1 "2024-05-14T22:44:59Z")

</div>

I am sending out SMTP emails with an HTML body that includes some embedded images using Base64Strings. The emails and images look perfect when viewing in-house in Outlook. When the emails are sent to an external account such as Gmail the images don’t display and all you can see in the Base64 strings. Is there a simply fix, or a better way to embed images into a HTML email body?

Thanks

Craig…

---

<div class="post-metadata">

**Author:** ![ppr](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ppr/32/464097_2.png) [@ppr](https://forum.uipath.com/u/ppr)\
**Post date:** [May 14, 2024, 10:49pm UTC](https://forum.uipath.com/t/render-html-base64-images/740997/2 "2024-05-14T22:49:17Z")

</div>

Let us know in detail how you embed the Base64 string image src value. Thanks

UPD1 -  
lets also get mentioned the GMail typical behaviour of embedded base64 imgs vs. attached images and referenced inside a img tag

---

<div class="post-metadata">

**Author:** ![craig.norton](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/craig.norton/32/268026_2.png) [@craig.norton](https://forum.uipath.com/u/craig.norton)\
**Post date:** [May 14, 2024, 11:11pm UTC](https://forum.uipath.com/t/render-html-base64-images/740997/3 "2024-05-14T23:11:28Z")

</div>

So here are the steps I go through to get the images embedded.

1. Load the location of the image into a string variable

2. Create a Byte Array variable and set as follows: System.IO.File.ReadAllBytes(TickImage)

3. Create a String variable for the Base64 string as follows: Convert.ToBase64String(TickImageByteArray)

4. Create a String variable for the HTML Tag as follows: “\<img src=”“data:image/png;base64,” + TickImageBase64String + “”" width=““72"” height=”“72"”/\>"

5. There are 2 images, a Tick and a Cross which are processed the same above. I then determine based on data which one to display and copy that HTML Tag into a final String Variable called OverallResultImage. This is then added to the Email Body as follows:

“Annual Requirement Met” + “  
” + OverallResultImage

I have included 2 attachments showing Outlook and Gmail.

 ![Viewing in Gmail](https://global.discourse-cdn.com/uipath/original/4X/a/8/e/a8e0e7bf82995e3f961f3d6e8fe1d7a5cb229da7.jpeg)  
 ![Viewing in Outlook](https://global.discourse-cdn.com/uipath/original/4X/3/1/7/317f94f381dd932fd7e20b5d4d3c761b1ec37a8e.jpeg)

---

<div class="post-metadata">

**Author:** ![lrtetala](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@lrtetala](https://forum.uipath.com/u/lrtetala)\
**Post date:** [May 15, 2024, 1:06am UTC](https://forum.uipath.com/t/render-html-base64-images/740997/4 "2024-05-15T01:06:04Z")

</div>

Hi @craig.norton

Please check this

[![](https://global.discourse-cdn.com/uipath/original/4X/9/f/4/9f43ef39159d5c76c6b5e5cf7c15bb9906fc9aa4.jpeg "Embed Image in Mail Body using UiPath | Send Inline Images in Mail | Outlook | Gmail | Base64 String") ](https://www.youtube.com/watch?v=HDkm0JKexNk)

Cheers!!

---

<div class="post-metadata">

**Author:** ![craig.norton](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/craig.norton/32/268026_2.png) [@craig.norton](https://forum.uipath.com/u/craig.norton)\
**Post date:** [May 15, 2024, 2:40am UTC](https://forum.uipath.com/t/render-html-base64-images/740997/5 "2024-05-15T02:40:06Z")

</div>

Hi @lrtetala

I have watched that video previously and everything is setup in the same steps, however when viewing in gmail the images don’t appear.

---

<div class="post-metadata">

**Author:** ![ppr](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ppr/32/464097_2.png) [@ppr](https://forum.uipath.com/u/ppr)\
**Post date:** [May 15, 2024, 8:11am UTC](https://forum.uipath.com/t/render-html-base64-images/740997/6 "2024-05-15T08:11:12Z")

</div>

> [@ppr](#):
>
> GMail typical behaviour of embedded base64 imgs

kindly note also:

> **[Can I email… Base 64 image format](https://www.caniemail.com/features/image-base64/)**
>
> Supported in Apple Mail, Yahoo! Mail. Partially supported in Outlook. Not supported in Gmail.

> [@Send Embedded Images in an Email](https://forum.uipath.com/t/send-embedded-images-in-an-email/307091):
>
> How to send embedded images in an email using UiPath? Issue Overview In most email clients, it is possible to send embedded images in an email. A common question is how to do this using UiPath. This guide will explain a few different ways that this can be done. Technical Overview This guide will cover three ways of embedding in image in a UiPath email. &nbsp; Using a base64 encoded image -&nbsp;This is one of the easiest methods but clients like Gmail will block the image from being displayed …

 ![grafik](https://global.discourse-cdn.com/uipath/original/4X/c/2/2/c229176d4cdd7f64a5ca3e71481b7ca6aadfdeee.png)  
which was mentioned:

> [@ppr](#):
>
> attached images and referenced inside a img tag

So can you try the alternates?
