I have a web page that includes a bunch of images. Sometimes the image isn\'t available, so a broken image is displayed in the client\'s browser.
How do I use jQuery
I got the same problem. This code works well on my case.
// Replace broken images by a default img $('img').each(function(){ if($(this).attr('src') === ''){ this.src = '/default_feature_image.png'; } });