Image Not Found Solution

It is very annoying when missing images are shown as the default broken image as it is first of all, ugly, and secondly sometimes destorts the height/width of your content. This is a very quick and easy solution:

<img src=”myImage.jpg” onerror=”this.src=’no-image-found.jpg’;” alt=”My Image”/>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s