The images which are wouldn’t successfully load on the web page will show nothing when the source does not exist.
It looks bad when there are many images and some of them are missing.
For solving this you need to look through all the pages and find the broken images and fix them manually time to time. It is a time-consuming process.
In this tutorial, I will show you two examples, to automatically detect the broken images and replace with another image.
- In the first one, I am using the jQuery, and
- In the second, using AJAX with jQuery