4

I've installed the latest ImageMagick on my ubuntu 14 server. If I force imageDriver to use 'imagick', I can only upload Gif images. And if I force it to use GD, I can upload all images but only static gif images.

enter image description here

The images are not changed in any programs.

It's important for me to have both options. Any ideas what this issues can be? I use php 7.0

Upload failed for background.jpg. The error message was: “Error uploading the file: The file “/var/www/html/craftcms/craft/storage/runtime/temp/assets57cb93709cf445.74590720.jpg” does not appear to be an image.”
william
  • 143
  • 5
  • Go to /admin/utils/phpinfo and search for "fileinfo". Do you see any references to that? – Brandon Kelly Sep 04 '16 at 13:55
  • Yes I see. http://share.engbjerg.dk/PHuqsGTuCK.jpg - It't uploading gif image but only with ONE loop. :S – william Sep 04 '16 at 16:51
  • In case it helps others: I got this error with a client trying to upload huge animated gifs (3000 x 3750px). I guess the imagemagick resources were being exhausted. It was resolved by asking them to upload a smaller version (half the dimensions). – Josh Harrison Jun 28 '22 at 09:28

1 Answers1

4

That error will occur if the fileinfo extension or imagick (ImageMagick) extension are not configured with a comprehensive list of file MIME types (the "magic file", as they refer to it, I think), or the images you're uploading aren't really images despite their extensions.

Regarding GIFs - you must use ImageMagick if you want to upload animated GIFs, as it's not possible for Craft to reconstruct an animated gif using the GD library.

Mats Mikkel Rummelhoff
  • 22,361
  • 3
  • 38
  • 69
Brandon Kelly
  • 34,307
  • 2
  • 71
  • 137
  • Thanks. Spend the week trying like everything on my ubuntu server. Updating my broken ImageMagick extension fixed everything. – william Sep 05 '16 at 09:30
  • I built an Ubuntu 14.04.5 LTS server with PHP7 that has ImageMagick installed and yet an empty magic file as mentioned ages ago in this Ubuntu bug report. Haven't resolved yet, but I figure it's worth a clue if someone else winds up in the same predicament. – Matt Stein Nov 17 '16 at 23:41