I have an HTML newsletter with a base64
encoded svg
background image like so:
<table
border="0"
cellpadding="0"
cellspacing="0"
class="container"
width="630"
style="
background-color: #ffffff;
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAwMHB4JyBoZWlnaHQ9JzEwMDBweCcgdmlld0JveD0nMCAwIDEwMDAgMTAwMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48cGF0aCBjbGFzcz0ndHJpYW5nbGVzaGFwZScgc3R5bGU9J2ZpbGw6cmdiYSg0NiwxODIsMjQ4LDAuMyk7JyBkPSdNMCwwIEwxMDAwLDAgTDAsMTAwMCBMMCwwIFonPjwvcGF0aD48L3N2Zz4=');
background-repeat: no-repeat;
background-position: left top;
background-size: 55.8%;"
>
Even though svg
support in HTML email is limited I want to include it to target clients that do support it. When I paste my HTML code into a Mailchimp campaign it is working, it is shown in several email clients. But when I import the HTML into a Mailchimp template and then create campaigns from that template the svg
is not shown anymore in the delivered email (where it previously did show).
What could it be that Mailchimp does to this code when using it inside a campaign generated from a template?
I don't think it is Mailchimp that is the issue, I think it is that you are embedding the image. This is an inconsistent method by itself and then you are using an SVG file (spotty support as you mentioned) and using CSS to declare a background which is also spotty. I would likely look to host the file externally as there is little evidence embedded images provide any benefits really and then use backgrounds.cm to create a more comprehensive background image set up (and include a backup jpg or png image for those clients that do not support SVG.