Error Uploading Assets We're receiving the following error when uploading Assets:


  Upload failed for Michael-Mabry-COO-MOOYAH-executive.png. The error
  message was: “Error uploading the file: The file
  “/nfs/c12/h03/mnt/215595/domains/mooyah.com/html/craft/storage/runtime/temp/assets57c97ea812e213.88692692.png”
  does not appear to be an image.”




I assumed this was a case of the client formatting the images incorrectly, but I tried it myself and they are valid image files.

Anyone come across this before?
I had the same issue on macOS Sierra, running on with the following installed using homebrew:


Craft CMS (2.6.2989)
nginx (1.12.1)
php-fpm 7.1 (7.1.8)
php71-imagick (3.4.3)


After a number of hour of digging around I found the following.

By default (don't ask me why), the configuration file for Imagick has image format configuration commented out....Thanks for that guys.

The Fix

Uncomment file format configurations in /usr/local/etc/ImageMagick-7/magic.xml

&lt;magicmap&gt;
  &lt;magic name="GIF" offset="0" target="GIF8"/&gt;
  &lt;magic name="JPEG" offset="0" target="\377\330\377"/&gt;
  &lt;magic name="PNG" offset="0" target="\211PNG\r\n\032\n"/&gt;
  &lt;magic name="TIFF" offset="0" target="\115\115\000\052"/&gt;
&lt;/magicmap&gt;


Then restart php-fpm (on macOS it was for me brew services restart php71)

Don't forget!

Once you've done the above, don't forget to run the Update Assets Indexes in Craft CP. This will generate all of the thumbnails for the images.



Hope this helps someone.