diff --git a/tornado_gallery/static/generator.thtml b/tornado_gallery/static/generator.thtml index ef84d0c..71148ee 100644 --- a/tornado_gallery/static/generator.thtml +++ b/tornado_gallery/static/generator.thtml @@ -86,6 +86,8 @@ body { */ return { src: curr_img.src, + width: curr_img.width, + height: curr_img.height, href: '{{site_uri}}' + gallery.name + '/' + photo @@ -105,6 +107,8 @@ body { render_img(gallery.content[i]).then(function (res) { last_img.src = res.src; + last_img.width = res.width; + last_img.height = res.height; last_lnk.href = res.href; var progress = Math.round( 100*( i + 1 ) @@ -115,6 +119,7 @@ body { next(); }).catch(function (err) { console.log('Failed request: ' + err); + setTimeout(next, 2000); }); };