In a 3 tier app where users can create their own entities I want to use icons for various types of records.

However, if someone creates a new entity then (obviously) no image will exist for it and a X image will show, yuk.

Is there a way to look at an image ON THE CLIENT and tell if it is a bad one? This check would be done to replace the bad image with a standard one.

Unfortunately because this is all handled by XSL parsing XML it MUST be done on the client.

Any ideas?