209,205
edits
Changes
don't perform these actions until after the image has loaded
$image_wrapper.css('min-height', $image_wrapper.height());
var img = new Image(); img.onload = function() { // Change the main image's URL to the new image and set its width and height $main_image .attr('src', src) .attr('width', width) .attr('height', height);
});
/* End of mw.loader.using callback; DO NOT ADD CODE BELOW THIS LINE */
});