There are three pieces of information to identify the exact error:
- Error message
- URL, in which file the error occurred
- The line number in the given URL where error occurred
Alternatively, you can use an onerror method to display an error message if there is any problem in loading an image.
<img src="image.jpg" onerror="alert('Loading failed')" />