1

I'm doing some testing on file uploads and discovered that the .bmp file format gets rejected even though defined in my config file as an allowed file extension.

I have added the following to my config file:

 'extraAllowedFileExtensions' => 'bmp, jpeg, tiff, pdf, cdr, gbr, gtl, dxf, dwg',
 'allowedFileExtensions' => 'bmp, jpeg, tiff, pdf, cdr, gbr, gtl, dxf, dwg',

This is the error I receive:

The file “/private/var/tmp/php7Md2bj” does not appear to be an image.

/shop/craft/app/etc/image/Image.php(138)

138    throw new Exception(Craft::t('The file “{path}” does not appear to be an image.', array('path' => $path)));

How do I fix this?

2
  • Have you tried 'turning it off and on again' - i.e. open the file in photoshop or similar and save-as ? (Just thinking out aloud)
    – Matt P
    Commented Jul 7, 2016 at 9:48
  • Tried that - it does this to all .bmp files
    – Dan Lee
    Commented Jul 7, 2016 at 10:55

1 Answer 1

5

You're probably using GD, which doesn't support BMP files.

If you install Imagick on your server, Craft will use it automatically and it supports a much wider range of file types, including BMP files.

1
  • We noticed that with Imagick enabled users can no longer download PDFs orders from the website. Have you come across this issue?
    – Dan Lee
    Commented Sep 22, 2016 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.