public function isImage()
    {
        $mime = $this->getMimeType();

        // The $image_mimes property contains an array of file extensions and
        // their associated MIME types. We will loop through them and look for
        // the MIME type of the current UploadedFile.
        foreach ($this->image_mimes as $image_mime) {
            if (in_array($mime, (array)$image_mime)) {
                return true;
            }
        }

        return false;
    }