Skip to content

Node.js based forum software built for the modern web

fix: closes #13036, if image isn't loaded yet width is 0

Barış Soner Uşaklıd05c203bb2bf
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') || '';