mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed EmailRenderer stripping inline width tags from images (#18587)
no issue - product card outputs the original width/height of the image in emails which results in overflown images in Outlook - Combined with https://github.com/TryGhost/Koenig/pull/983/files, this change fixes rendering for product card images in Outlook --------- Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
This commit is contained in:
parent
fb34e285fc
commit
0c972d8276
3 changed files with 5 additions and 6 deletions
|
@ -370,8 +370,8 @@ class EmailRenderer {
|
||||||
|
|
||||||
// Juice HTML (inline CSS)
|
// Juice HTML (inline CSS)
|
||||||
const juice = require('juice');
|
const juice = require('juice');
|
||||||
juice.heightElements = ['TABLE', 'TD', 'TH'];
|
juice.heightElements = ['TABLE', 'TD', 'TH', 'IMG'];
|
||||||
juice.widthElements = ['TABLE', 'TD', 'TH'];
|
juice.widthElements = ['TABLE', 'TD', 'TH', 'IMG'];
|
||||||
html = juice(html, {inlinePseudoElements: true, removeStyleTags: true});
|
html = juice(html, {inlinePseudoElements: true, removeStyleTags: true});
|
||||||
|
|
||||||
// happens after inlining of CSS so we can change element types without worrying about styling
|
// happens after inlining of CSS so we can change element types without worrying about styling
|
||||||
|
|
|
@ -637,8 +637,7 @@ a[data-flickr-embed] img {
|
||||||
.kg-image-card img {
|
.kg-image-card img {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: auto;
|
height: auto;
|
||||||
height: auto !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.kg-bookmark-container {
|
.kg-bookmark-container {
|
||||||
|
|
|
@ -685,8 +685,8 @@ a[data-flickr-embed] img {
|
||||||
.kg-image-card img {
|
.kg-image-card img {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: auto;
|
/* width: auto;
|
||||||
height: auto !important;
|
height: auto !important; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.kg-bookmark-container {
|
.kg-bookmark-container {
|
||||||
|
|
Loading…
Add table
Reference in a new issue