To fix broken images in Javascript you can use the following snippet.

Sample Javascript

$('image').error(function(){
$(this).attr('src', ‘image/no_image.png’);
});

2 thought on “How to fix broken images in Javascript”

Leave a Reply