I recently built a webpart that, among other things, displays an image, but the webpart really only generates the html to reference an image and it could not easily guarantee that the image would be available and I wanted to show something better than a red x.
By using a little script on the 'onerror' attribute for the img tag, I was able to reference a "image not available" picture in case the image failed to load.
Here's an example:
<img src="maybethisworks.jpg" onerror="this.src='/notavailable.gif';" />
That's it. It works on Opera9.5, Firefox2, IE7, Navigator9, and Safari3.
Edit: I felt panic when I noticed that all my images where coming up with the not available picture. After some flail I finally realized what was going on. The images were in a checked-out state which means that if I was authenticated they would appear, but if I was anonymous, they wouldn't and I would get the onerror behavior.
BTW: For anyone needing to perform check-in on many files (which is what you get after you upload a directory of images to a image library) you can use the "Manage Site Content and Structure" feature of MOSS which will allow you to do a mass check in.