Error Uploading Assets
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.