public function is_image()
{
// IE will sometimes return odd mime-types during upload, so here we just standardize all
// jpegs or pngs to the same file type.
$png_mimes = array('image/x-png');
$jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg');
if (in_array($this->file_type, $png_mimes)) {
$this->file_type = 'image/png';
} elseif (in_array($this->file_type, $jpeg_mimes)) {
$this->file_type = 'image/jpeg';
}
$img_mimes = array('image/gif', 'image/jpeg', 'image/png');
return in_array($this->file_type, $img_mimes, TRUE);
}