When we are working with websites some times images may failed to load. To Identify is the image is loaded or not the follwing is the solution.
Solution 1
Solution 1
function IsImageLoaded() { if($('#img_id').attr('complete')){ alert('Image is loaded!'); return true; } else { return false; } }Solution 2
$("#photo").error(function() { alert("Image failed to load"); });