<p>My guess is you're using <a href="https://secure.php.net/manual/en/book.image.php" rel="nofollow">GD</a> for your image processing library and the PNG is in a format that it doesn't recognize. Try installing <a href="https://secure.php.net/manual/en/book.imagick.php" rel="nofollow">Imagick</a>.  Craft will use it automatically if it sees it's installed and it support a much wider range of image formats.</p>

CC BY-SA 3.0
2016-09-04T23:10:35.120Z
ImageMagick appears to be installed, but Craft isn't picking it up or the server (Media Temple Grid) isn't allowing PHP to access it.

https://mediatemple.net/community/products/grid/207470423/is-imagemagick-installed-on-the-grid#3

I don't have access to php.ini so I'm hoping I can do this through htaccess somehow?
Marc Debiak
CC BY-SA 3.0
2016-09-05T04:37:06.097Z
They've got an .htaccess solution in the article you linked to?
Brad Bell
CC BY-SA 3.0
2016-09-06T14:35:39.587Z
I saw that but it doesn't provide enough detail about how to actually make it work. Any help would be great!
Marc Debiak
CC BY-SA 3.0
2016-09-06T17:51:04.793Z
Open your `php.ini` file and add `open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin/convert` to it. Probably best contacting MediaTemple as well.
Brad Bell
CC BY-SA 3.0
2016-09-02T17:12:57.210Z
2016-09-02T17:12:57.210Z
Brad Bell
<p>I had the same issue on <code>macOS Sierra</code>, running on with the following installed using <code>homebrew</code>:</p>

<ul>
<li>Craft CMS (2.6.2989)</li>
<li>nginx (1.12.1)</li>
<li>php-fpm 7.1 (7.1.8)</li>
<li>php71-imagick (3.4.3)</li>
</ul>

<p>After a number of hour of digging around I found the following.</p>

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

<h3>The Fix</h3>

<p>Uncomment file format configurations in <code>/usr/local/etc/ImageMagick-7/magic.xml</code></p>

<pre><code>&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;
</code></pre>

<p>Then restart php-fpm (on macOS it was for me <code>brew services restart php71</code>)</p>

<h3>Don't forget!</h3>

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

<p><a href="https://i.sstatic.net/ioEiS.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ioEiS.jpg" alt="Run -&gt; Update Assets Indexes"></a></p>

<p>Hope this helps someone. </p>

CC BY-SA 3.0
2017-08-27T11:03:26.910Z
2017-08-27T11:03:26.910Z
Sergei Filippov
<p>We're receiving the following error when uploading Assets:</p>

<blockquote>
  <p>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.”</p>
</blockquote>

<p><a href="https://i.sstatic.net/aGjzp.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aGjzp.jpg" alt="enter image description here"></a></p>

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

<p>Anyone come across this before?</p>

CC BY-SA 3.0
2016-09-04T12:37:26.517Z
Having the same problem!! :S http://craftcms.stackexchange.com/questions/16681/the-file-does-not-appear-to-be-an-image-bug
william
<assets>
Error Uploading Assets
# Error Uploading Assets

(Asked by: username_0 on 2016-09-02)

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.”

[![enter image description here](https://i.sstatic.net/aGjzp.jpg)](https://i.sstatic.net/aGjzp.jpg)

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?

**Tags:** assets

> **Comments:**
> **username_1**: Having the same problem!! :S http://craftcms.stackexchange.com/questions/16681/the-file-does-not-appear-to-be-an-image-bug  

---

## 2 answers

### Answer by username_2 on 2016-09-02. Score: 0 | Accepted answer

My guess is you're using [GD](https://secure.php.net/manual/en/book.image.php) for your image processing library and the PNG is in a format that it doesn't recognize. Try installing [Imagick](https://secure.php.net/manual/en/book.imagick.php). Craft will use it automatically if it sees it's installed and it support a much wider range of image formats.

> **Comments:**
> **username_0**: ImageMagick appears to be installed, but Craft isn't picking it up or the server (Media Temple Grid) isn't allowing PHP to access it.  https://mediatemple.net/community/products/grid/207470423/is-imagemagick-installed-on-the-grid#3  I don't have access to php.ini so I'm hoping I can do this through htaccess somehow?  
> **username_2**: They've got an .htaccess solution in the article you linked to?  
> **username_0**: I saw that but it doesn't provide enough detail about how to actually make it work. Any help would be great!  
> **username_2**: Open your `php.ini` file and add `open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin/convert` to it. Probably best contacting MediaTemple as well.  

---

### Answer by username_3 on 2017-08-27. Score: 2

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

  
  
  
  


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.


---

