I have an email newsletter, that contains product pictures of the products, which are promoted via newsletter. I use full size pictures and resize them with:
<table cellspacing="0" cellpadding="0" border="0" style="width: 201px; height: 240px; background-image: url({{ item1.picture }}); background-repeat: no-repeat; background-size: 100% auto;">
Gmail strips the
background-size: 100% auto;
tag and the pictures are shown in their full size. Is there any way how to fix this? I don't want to resize each picture on the server side.
Since Gmail has started loading images by defult they are now supporting background images.
Click Email templates. Click Create Template. Click the Code your own tab, and select Paste in code. In the Code Editor, insert the following code just after the opening <body> tag to add the placeholder background image and color.
You can add background images—with no coding required! To try it for yourself, sign up now for free. If you have an existing HTML email template, Campaign Monitor's “Bulletproof Background Images” has the code snippets you need to create email body background images.
I worked around this by using the background css shorthand method. Define the image, repeat, and size all in one line like so:
background: url({{ item1.picture }}) no-repeat top / 100% auto;
Notice that the size attribute should be defined after the position attribute ('top') and delimited with '/'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With