diff --git a/boards/static/js/image.js b/boards/static/js/image.js --- a/boards/static/js/image.js +++ b/boards/static/js/image.js @@ -42,12 +42,19 @@ SimpleImageViewer.prototype.view = funct // When we first enlarge an image, a full image needs to be created if (images.length == 1) { + var thumb = images.first(); + + var width = thumb.attr('data-width'); + var height = thumb.attr('data-height'); + var parent = images.first().parent(); var link = parent.attr('href'); var fullImg = $('') .addClass(FULL_IMG_CLASS) - .attr('src', link); + .attr('src', link) + .attr('width', width) + .attr('height', height); parent.append(fullImg); }