flamingsquirrel

Missing image problem

I have often come across the problem of a missing image when developing a site.

The solution is simple.

<img src=”image.gif” width=”100″ height=”100″ onerror=”this.src=’error.gif’;”>

If the correct image doesn’t exist the image named error.gif will be used instead.

Credit goes to Rob Gonda for this tip.

Leave a Reply