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.


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

How do I fix this?

  • 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
    Jul 7 '16 at 9:48
  • Tried that - it does this to all .bmp files
    – Dan Lee
    Jul 7 '16 at 10:55

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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