Preserve image accessibility and dimensions in MJML
This commit is contained in:
1 parent
1c05e02d94
commit
07ed6b2596
4 files changed
+32
-4
No files matched your search
@@ -382,7 +382,7 @@ export const imageBlock = leaf(
|
||||
node,
|
||||
),
|
||||
mjml: ({ node }) =>
|
||||
`<mj-image src="${html(attrs(node).src)}" alt="${html(attrs(node).alt)}" width="${html(attrs(node).width)}px" />`,
|
||||
`<mj-image src="${html(attrs(node).src)}" alt="${html(attrs(node).decorative ? "" : attrs(node).alt)}" width="${html(attrs(node).width)}px" height="${html(attrs(node).height)}px" />`,
|
||||
},
|
||||
({ node }) => (attrs(node).decorative ? "" : `[${String(attrs(node).alt)}]\n\n`),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user