diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js index 074350f40ca..670d72083ea 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -734,7 +734,7 @@ async function toInline($editable, cssRules, $iframe) { for (const image of images) { if (image.style[attributeName] !== 'auto') { const value = image.getAttribute(attributeName) || - (attributeName === 'height' && image.offsetHeight); + (attributeName === 'height' && image.offsetHeight) || (attributeName === 'width' ? _getWidth(image) : _getHeight(image)); if (value) { image.setAttribute(attributeName, value);