Mosaic uses the MIME conventions for Multimedia configuration.
XV is an example of an external viewer which is typically invoked for many types of image documents.
If it's not obvious yet, viewers run only on the client. Since viewers can run customized code on your client, there is also a security vulnerability. You wouldn't want to run unknown code on your client unless you had some method of protecting yourself against stupid or malicious documents or viewers.