In the file_validate_is_image() function we're reporting an inaccurate message. Currently we say that only PNG, JPG, and GIF images are supported, when in fact any image supported by PHP's getimagesize will pass (such as PSD, TIFF, PICT, etc.)

This functionality may get even more blurred with #269337: Support for more image types (PDF, TIFF, EPS, etc.), in which additional types such as PDF or EPS might become supported. So the easy solution is simply to fix this message. This is a forward-port from FileField in Drupal 6.

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new1.28 KB

Well I thought I fixed that test, but must not have made it into the patch.

drewish’s picture

I haven't tested that function on other formats but if you take a look at image_get_info() you'll see that only those three types set an extension.

quicksketch’s picture

Status: Needs review » Needs work

Oh a good point, maybe this should wrapped into #269337: Support for more image types (PDF, TIFF, EPS, etc.) then?

drewish’s picture

Status: Needs work » Closed (duplicate)

quicksketch yeah that seems like the best place for it.