Image to html string, then emailed off

I’ve successfully put a captured signature into an html string by…

t = t  & "<img src='" & SigImageStr & "' height=80 width=180>"

How would I go about putting Image.png file into the html string? If I do…

t = t  & "<img src='Image.png' height=80 width=180>"

…it displays in the jqxEditor ok but is not retained when I send Editor.val by email through php script. FYI My signatures are retained in the sent email.

Below image shows the captured image is displayed ok in the received email but the missing image next to ‘Note:’ is obviously missing

The best way to move strings around is in Base64 format. It transforms the image data into a printable string:

https://blog.appstudio.dev/2011/03/images-in-strings-and-base64/

I’ve got saving string images ok. Not sure how to convert an image to a string. Currently I put the image into a picturebox then Picturebox.todataurl to get the string. Is there a more efficient way to convert?

That’s exactly what that function is for.

Here’s an article with this solution and another.

I’ve got the base64 strings showing in an email ok. Gmail strips all the inline images out of the message string. Is there a workaround to get past Google?