diff --git a/client/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx b/client/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx index eeb84536..f3826fb3 100644 --- a/client/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx +++ b/client/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx @@ -23,6 +23,13 @@ function parseImageAttr(attr: { height: string; width: string }): { return {}; } + if (height <= MAX_HEIGHT && width <= MAX_WIDTH) { + return { + height, + width, + }; + } + const ratio = Math.max(height / MAX_HEIGHT, width / MAX_WIDTH); return {