0

I use custom HTML for my email templates. When a new image is uploaded into an email there is always an image heigth populated in the code. In a two column responsive content block we have to delete "height" manually every time we build new emails.

Is there away to prevent the system from setting this value?

Thanks Oliver

  • Have you disabled the "Scale to fit" option on the image? – Lukas Lunow Oct 15 '18 at 9:37
0

It seems like Content Builder adds its own <img src...> tag with standard attributes. Everytime a new image is replaced or added using the UI this happens to be the case.

To resolve this behaviour you'd created a class and set it to the wrapping <td> or <table> since these HTML tags don't get affected by the UI

For example:

<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td align="center" class="ImageAuto"><img src="http://unsplash.it/g/600/400?text=BANNER" width="100%" border="0" alt="BANNER" style="display:block;" /></td>
    </tr>
</table>

Above code, you can see the <image> tag being wrapped around <td> which won't be replaced or altered by the Content Builder UI. You can then use the class ImageAuto in your media query to handle the height of the image.

For example:

.ImageAuto img { 
          height: auto !important;
          width: 100% !important;
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.