Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JQuery code to swap out broken images with a replacement image.
$(document).ready(function() {
$('img').error(function(){
$(this).attr('src', 'not_found.png');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.