From d05c203bb2bfc2a18b6e97fd03619b62beede65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 8 Jan 2025 09:43:08 -0500 Subject: [PATCH] fix: closes #13036, if image isn't loaded yet width is 0 --- public/openapi/read/config.yaml | 2 -- public/src/client/topic/images.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/public/openapi/read/config.yaml b/public/openapi/read/config.yaml index 3b38168c2e..5e6f05d91c 100644 --- a/public/openapi/read/config.yaml +++ b/public/openapi/read/config.yaml @@ -122,8 +122,6 @@ get: type: array items: type: string - resizeImageWidth: - type: number cookies: type: object properties: diff --git a/public/src/client/topic/images.js b/public/src/client/topic/images.js index 5fc2b34f66..c4c30319d8 100644 --- a/public/src/client/topic/images.js +++ b/public/src/client/topic/images.js @@ -19,7 +19,7 @@ define('forum/topic/images', [], function () { } if (!imageEl.parent().is('a')) { - if (utils.isRelativeUrl(src) && suffixRegex.test(src) && imageEl.get(0).naturalWidth >= config.resizeImageWidth) { + if (utils.isRelativeUrl(src) && suffixRegex.test(src)) { src = src.replace(suffixRegex, '$1'); } const alt = imageEl.attr('alt') || '';