New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] Better check on ImageMagick installation. #5435
Comments
As far I have tried; the requirements check should be extended from
to
But even better also check if JPG/GIF/PNG is in the list. |
Weird... Curious why
Any ideas @bertoost @jasonmccallister? |
Yeah I don't know exactly, but the I found the |
FWIW I'm keeping an eye on this issue wondering if it's related to an unsolved SVG mystery, where either image driver sometimes fails to load a source SVG to transform. Deep down, each one claims the source SVG isn't in a known format. (Either May be unrelated, but something isn't always convinced it can handle images even when the server software's ready to go. Edit: I last checked with Craft 3.3.6 and 3.3.12, once with PHP 7.3.10+GD 7.3.10 and again with 7.3.5+ImageMagick 6.9.7-4. |
@bertoost can you share the complete Dockerfile? I'd like to build locally and take a look. |
Sure, it's public on github; |
Thanks @bertoost. Did a little research and there are a few things that come to mind. I have had issues setting up imagick and alpine in the past that I had to pass some specific flags when installing the ext. I also found this post on our SE that talks about the same error: https://craftcms.stackexchange.com/questions/16681/the-file-does-not-appear-to-be-an-image-bug Can you check imagick on the CLI to make sure its configured and working properly? |
Hi @jasonmccallister I have installed it now correctly, with above solution. But just suggest a little improvement on the requirements since I ran into this after I thought it was installed, but not installed correctly. |
Resolved this here: |
Cool! Thanks @angrybrad |
Craft 3.4.0-RC3 is out now with this fix. |
Description
Creating an Docker image with PHP 7.4.1 based on Alpine Linux I found some issues installing ImageMagick correctly. Getting this error message in Craft CP
After some intensive debugging I found the actual error occurs by ImageMagic used in
vendor/pixelandtonic/imagine/src/Imagick/Imagine.php :: open($path)
. The error was triggered by ImageMagick because the\Imagick::queryFormats()
did not return any formats (just an empty array).Therefore the System Report page in the CP shows that ImageMagick is installed successfully.
Maybe it's good to improve this with checking above method to return at least something? And maybe even check if JPG/JPEG/GIF/PNG etc. are in it?
Additional info
After I fixed the ImageMagick installation by the next lines (for anyone searching for it), the method from above returned a list of 233 items and after that uploading images works like a charm again.
The text was updated successfully, but these errors were encountered: