diff --git a/dev/Common/Html.js b/dev/Common/Html.js
index dd172b303..084d9950f 100644
--- a/dev/Common/Html.js
+++ b/dev/Common/Html.js
@@ -241,7 +241,7 @@ export const
delAttribute('width');
}
value = oStyle.removeProperty('width');
- if (value) {
+ if (value && !oStyle.maxWidth) {
oStyle.maxWidth = value;
oStyle.width = '100%';
}
@@ -252,7 +252,7 @@ export const
delAttribute('height');
}
value = oStyle.removeProperty('height');
- if (value) {
+ if (value && !oStyle.maxHeight) {
oStyle.maxHeight = value;
}
}