IsImage validator checks if a transferred file is a image
file, such as gif or jpeg. This validator is based on the
MimeType validator and supports the same methods and options.
You can limit this validator to particular image types with the methods described there.
Example 420. Using the IsImage Validator
$upload = new Zend_File_Transfer();
// Checks whether the uploaded file is a image file
// Limits this validator to gif files only
$upload->addValidator('IsImage', false, array('application/gif'));
// Limits this validator to jpeg files only using a simpler notation
$upload->addValidator('IsImage', false, 'jpeg');
Note that there is no check if you set a MIME type that is not an image. For example, it would be possible to define zip files to be accepted by this validator. Using the 'MimeType' validator for files which are not images will result in more readable code.