summaryrefslogtreecommitdiff
path: root/static/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/client.js')
-rw-r--r--static/client.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/static/client.js b/static/client.js
index 545f0bc..89e9a5e 100644
--- a/static/client.js
+++ b/static/client.js
@@ -360,6 +360,23 @@ if(image_class !== null){
elem.getAttribute("data-json")
);
+ var imagesize = elem.getElementsByTagName("img")[0];
+
+ if(imagesize.complete){
+
+ var imagesize_w = imagesize.naturalWidth;
+ var imagesize_h = imagesize.naturalHeight;
+ }
+
+ for(var i=0; i<collection.length; i++){
+
+ if(collection[i].width === null){
+
+ collection[i].width = imagesize_w;
+ collection[i].height = imagesize_h;
+ }
+ }
+
var title = elem.title;
}