I've came up with this solution (jsfiddle) - implement $.error
function and change image src
attribute, but seams that this function is not always called and sometimes I get this image with
alt
text instead of one I provided. I use this jquery code to update images:
$(document).ready(function() {
$('img').error(function () {
var defaultSrc = $(this).data('default-src');
$(this).attr('src', defaultSrc);
});
});
data-default-src
attribute is also provided for each image. Is there some more advanced and certain jquery solution?