Image Load detection

$('<img />').load( function(){
console.log('Image Loaded');
$(".js-gallery-popup-loader").hide();
}).attr('src', item.imagePath);