mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	fix: closes #13036, if image isn't loaded yet width is 0
This commit is contained in:
		| @@ -122,8 +122,6 @@ get: | ||||
|                 type: array | ||||
|                 items: | ||||
|                   type: string | ||||
|               resizeImageWidth: | ||||
|                 type: number | ||||
|               cookies: | ||||
|                 type: object | ||||
|                 properties: | ||||
|   | ||||
| @@ -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') || ''; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user