Possible Duplicate:
How to silently hide “Image not found” icon when src source image is not found
Is there any way, to disable default icon of not found image? If src give 404, Chrome shows small icon. Firefox doesn’t show anything and I want the same in Chrome.
Any solution for that?
OR
You can use the
onerrorevent in JavaScript to act when an image fails to load:In jQuery:
Or for all images:
You should use
visibility: hiddeninstead of.hide()if hiding the images might change the layout. Many sites on the web use a default “no image” image instead, pointing thesrcattribute to that image when the specified image location is unavailable.