How to limit large images (for retina) in html table emails?

My site uses very large images, so we can optimize the work with mesh devices. On my WordPress site, we create 1200x640 images and limit their size to 600x320 in the theme template.

For example: <img src="image/path" width="600" height="320" /> 

As a result, my RSS feed contains large images (1200x640), and when we use them in our MailChimp template in RSS RSS feeds, the images blow out the size of the table cell. Is there anyway to wrap this Feedblock MailChimp tag with a span tag and set the maximum width? We strive to limit the image size (600x320) in the MailChimp newsletter template without having to change the RSS feed. Is it possible?

 *|FEEDITEM:IMAGE|* 
+4
source share
1 answer

I did the same in many newsletters and advised against the comments above (few email clients support "background-size: cover", if at all.

The technique that seems to be best for us is to keep your table cells in any width, but then the maximum width is set in the style attribute of the image itself: 100%. This means that he respects the maximum width of his parent, and not his "natural" image size. If you cannot edit the image tag itself, finding its class and adding a max-width style to your mailing style should also work very well.

0
source

Source: https://habr.com/ru/post/1441879/


All Articles