+ 1

Image not found.

what code will be to show the pic is not found.

30th May 2017, 4:56 PM
Abhi DG
Abhi DG - avatar
2 Answers
+ 16
<img src=
 alt=NotFound onerror=alert("NotFound!")>
30th May 2017, 5:51 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 7
Use alt attribute of image to indicate that image is not found or broken due to speed issue or something like that. eg. <img src="picture.jpg" alt="myPicture">
30th May 2017, 5:27 PM
Sachin Artani
Sachin Artani - avatar