esp-html-bugs icon indicating copy to clipboard operation
esp-html-bugs copied to clipboard

Klaviyo - image-block removing all attributes.

Open JayOram opened this issue 4 years ago • 0 comments

Using the klaviyo-image-block as described in the official Klaviyo documentation. Will remove all attributes from the <img> tag.

<td data-klaviyo-region="true">
   <div class="klaviyo-block klaviyo-image-block">
<a href="https://example.uk/"><img src="https://via.placeholder.com/1280x800" style="display:block;width:100%;max-width:640px;" alt=""></a>
   </div>
</td>

The image gets changed changed to:

<img align="left" alt="" class="kmImage" src="https://d3k81ch9hvuctc.cloudfront.net/company/QZbYdW/images/9c191499-33ef-494d-b20a-67849b71016c.png" style="max-width:640px;padding:0;border-width:0;" width="600">

Therefore losing responsiveness and removing display:block; causing issues!

The workaround is to use a klaviyo-text-block - so that you can edit using the 'source' button - but not use the image UI.

JayOram avatar Nov 01 '21 15:11 JayOram