From 7961df36b22df027fb628338881d5dd58266b677 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 12 Aug 2013 11:55:23 +0200 Subject: [PATCH] Fixed resize of cached images --- wcfsetup/install/files/js/WCF.ImageViewer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 091a4df7e7..a90e5757af 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -64,6 +64,10 @@ WCF.ImageViewer = Class.extend({ * Initializes the image size check. */ _initImageSizeCheck: function() { + $('.jsResizeImage').each($.proxy(function(index, image) { + if (image.complete) this._checkImageSize({ currentTarget: image }); + }, this)); + $('.jsResizeImage').on('load', $.proxy(this._checkImageSize, this)); }, -- 2.20.1