Fix padded ALC images breaking out of width on mobile [MAILPOET-1693]

This commit is contained in:
wxa
2018-12-17 18:06:16 +03:00
parent d363017ac2
commit c2955bdf35
3 changed files with 2 additions and 6 deletions

View File

@ -22,9 +22,8 @@ class Image {
$element = self::adjustImageDimensions($element, $column_base_width);
}
$max_width = is_numeric($element['width']) ? ($element['width'] . 'px') : '100%';
$image_template = '
<img style="max-width:' . $max_width . ';" src="' . $element['src'] . '"
<img src="' . $element['src'] . '"
width="' . $element['width'] . '" alt="' . $element['alt'] . '"/>
';
if(!empty($element['link'])) {

View File

@ -28,6 +28,7 @@
}
.mailpoet_image img {
height: auto;
max-width: 100%;
-ms-interpolation-mode: bicubic;
border: 0;
display: block;