How To Hide Image Broken Icon

Many web designers & developers get an issue of broken image (" ") on the website.

The broken image are a common error. 

It gives an error because the image is not there in the directory/folder or the path of the IMG is not proper.

On website, it shows a broken image icon.

You can hide the broken icon with the help of a attribute in the HTML in IMG tag.

<img src="error.jpg" onerror="'none'"/>

In every IMG tag use the attribute " onerror ".

The attribute has a element "'none' ".

This attribute helps to hide the broken image icon.


Adarsh Vishwakarma

Share the Post



Leave a Comment