1
Image Width/Height Necessary
Is the width and height necessary for images?
We are automating an email with products as content so my template needs to be able to accept images that may have variable sizes. For example, one is 190 x 250 or another is 250 x 190. In order for the images to not be stretched to fill 250x250, is it just as simple as removing the width and height from the img or can I fill in with "auto" or 100%?
Short answer:
It's better if you do include them but they are not essential.
Long answer:
If you use '100%` then the image will fill the width available and the height will be auto generated when the image loads.
If you use
auto
or simply not add width and height, the image will render at it's real size. If you do this there are a couple of things to consider;You can't use retina images, as they will render at their original size.
When images are turned off it will affect the layout, and as there is no height and width there won't be a blank image in place to help prompt the user to turn images on.
This was a perfect answer. I will do my testing about what it looks like without images.
Unfortunately, I won't know the true height and width of the image when it gets imported automatically.