No way to set Image Height Attribute

When trying to compose an email, we need to set the width and height of an image.
When the email is viewed in Outlook, the image does not show as expected:


I expected the width and height attributes within the image tag, but it only created them in the style:


Outlook don´t work very well with HTML , i have to manipulate using table and Row


https://help.aweber.com/hc/en-us/articles/204030726-Why-doesn-t-my-HTML-message-display-correctly-in-Outlook-

Filipe Manteigas wrote:

Outlook don´t work very well with HTML , i have to manipulate using table and Row


https://help.aweber.com/hc/en-us/articles/204030726-Why-doesn-t-my-HTML-message-display-correctly-in-Outlook-

That is exactly why I need to be able to set the height property of an image. I've built a theme that would allow for the email to look good enough in Outlook. The only issue is not being able to resize the images. 

Currently, my workaround would be to build web pages with downloads in the preparations and then link the src with OSTagName etc.


The closest workaround is to create an image tag with unescaped expressions. The downside is that if you get an image from a download page, the .aspx tag breaks it for Outlook.

I can only hope Outsystems allow me to one day have a way to set the Height and Width attributes on an image.

For now the emails work fine on Gmail etc.

Hi Jinus,

I had a similar problem to you, unfortunately the image widget does not allow setting the height and width attributes as you have found.

The workaround I used was to ensure the image was the same size as I wanted it to display, so I did not need to specify the width and height attributes.

I hope this helps.

Kind regards,

Stuart

Jinuse wrote:

The closest workaround is to create an image tag with unescaped expressions. The downside is that if you get an image from a download page, the .aspx tag breaks it for Outlook.

I can only hope Outsystems allow me to one day have a way to set the Height and Width attributes on an image.

For now the emails work fine on Gmail etc.


One way to tackle this is to use SEO rules. Instead of pointing to an ASPX, you can create something like {ImageId}.png (or other type) and using SEO rules execute something like getimage.aspx?ImageId={ImageId}


Another way to overcome this is including the image within the email.

Get the Binary, make it Base64 encoded and use the source url in the a data url format:

data:image/gif;base64,YOURBASE64IMAGEDATA

Of course, make it the correct mime-type

This will not tackle all problems, but fixes a few. Keep in mind, mail-clients (and anti-virus/anti-spam filters)  will protect you, your system and your privacy, by preventing the contents based on the ruling/sender/trusted origins

Patrick Baanvinger wrote:

Jinuse wrote:

The closest workaround is to create an image tag with unescaped expressions. The downside is that if you get an image from a download page, the .aspx tag breaks it for Outlook.

I can only hope Outsystems allow me to one day have a way to set the Height and Width attributes on an image.

For now the emails work fine on Gmail etc.


One way to tackle this is to use SEO rules. Instead of pointing to an ASPX, you can create something like {ImageId}.png (or other type) and using SEO rules execute something like getimage.aspx?ImageId={ImageId}


Another way to overcome this is including the image within the email.

Get the Binary, make it Base64 encoded and use the source url in the a data url format:

data:image/gif;base64,YOURBASE64IMAGEDATA

Of course, make it the correct mime-type

This will not tackle all problems, but fixes a few. Keep in mind, mail-clients (and anti-virus/anti-spam filters)  will protect you, your system and your privacy, by preventing the contents based on the ruling/sender/trusted origins

Hi Patrick,
Thanks for the inputs.

I've tried manipulating the url to end with a .aspx?xyz.png, but Outlook still looks at the .aspx.

I solved the whole problem by having an entity with Image, Width, Height, Hash.
So everytime I want to include an image into my email, I would send my image into a web block that will resize the image into that Resize entity and then just include it like a normal image.



Outlook is the naughty child in the corner that nobody wants to play with, but unfortunately due to school policies, we have to include it in everything we do.