SL
0
Using Base64 Images
Hello,
I've been asked to design an email using Base 64 images. We have tested this using the below code and everything works ok appart from on outlook 2007,2011 and 2013 and then on various web-based clients. I believe that outlook will not display urls that have more than 3000 characters, but the below is about 2000.
Has anyone managed to succeffully implement Base64 images?
regards
Stephen
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAyAPoDASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAUGAwQHAgEI/8QAMhAAAQQCAQIDBwQABwAAAAAAAQACAwQFEQYSIRMxUQcVFiJBYXEUMkKBM1JTYoKDkv/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD9UoiICIiAiIgIvhIAJJ0Aqv8AFj7kjvh/DX8vAw6dahdHFCT6MdI5vX+W7H3QWlFCYbklTJXHUpIrNDJtZ4jqVyPok6d6Lm6Ja9oPbqYXD7qbQEREBERAWlmcjBiMXayFwkQV4y93T3J9APUk9gPUrdVWz7Dl+VYnE71VqD3naH+ctdqFn469v/6wg0+KZLPu5NJU5G+JhtY6O9FVjjAFZ3iOa+MPH7y0GPZPmT2ACuqq1N3vD2hXLMJ3BjaQpPd9HSyOEjm/8WsZ/wC1aUBERAREQEREBERAREQEREBERAREQEREBERBEctx9rK8ZydDHytit2IHRxue4tbsjyJAJAPkSASAdhRVXN5epXjrv4VlB4TQwClapvhAA0A0vmY7X5aFbFAcGv2L/GqvvCXxcjW6qlt+gCZo3FjyQPLZHV+CEGlLyCcTRWLvC87G+IHomLKszmb89eHM5w3r6Dup3EZWnl6It0JS+Hqc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ERAREQEREBERAREQFgrV4YHTGCGOMySGR/Q0DrdofMdeZ7Dv9kRBnREQEREBERAREQEREBERAREQEREBERB//2Q==" />
I remember Campaign Monitor looking at this years back https://www.campaignmonitor.com/blog/post/1761/embedding-images-in-email/ and then again in 2013 https://www.campaignmonitor.com/blog/post/3927/embedded-images-in-html-email but nothing more recent comes to mind. We tried base64 encoded web fonts a couple of months back and it blew out the file size.
Hello Anna,
Many thanks for the replay. From your links I've read that using CID method works across more clients. However if this is as simple as changing "<img src="data:image......" to <img src="CID:image....." i'm seeing no difference.
We are trying to get our customers to sign a form on a tablet device, and then get that form with base64 signature image to be emailed directly to their email account. So we may just try to find another solution. Many thanks once again
Stephen
link to a page that does the work in a browser?