Menu icon Foundation
Handling dynamic images in templates

Hi All,

 

I am new to this forum. I am developing email template , in which user will dynamically add the images from application.

As user adding the images it may be in one column or two column content. But when email triggered it will get distorted in outlook 2016.  Can you please guide me how we can handle the dynamic image (image size can be vary any time ). 

 

Regards,

Guruprasad Hebbar

email

Hi All,

 

I am new to this forum. I am developing email template , in which user will dynamically add the images from application.

As user adding the images it may be in one column or two column content. But when email triggered it will get distorted in outlook 2016.  Can you please guide me how we can handle the dynamic image (image size can be vary any time ). 

 

Regards,

Guruprasad Hebbar

Corey Schaaf over 2 years ago

Based on what your saying above, it sounds like the <img > tag is missing the height="" and width="" attributes. These are essential (especially if you are dealing with Retina images).  Please note you have to use the height="" and width="" attributes on the img tag and not style="height:; width:;".  

By not including those attributes, the images will most likely look squeezed and non-proportional in size. 

If you are adding the images via an application you've built, you'll need to find a way to specify the actual size of the image that is loaded. On mobile (not desktop outlook 2016 or web-outlook) the image classes are overwritten and use a 100% value so they take up whatever the space of the container they are sitting in.