Php Server, ImageMagick on Windows

Hello.

I have installed ImageMagick (IM) on Windwos 10, I can use “magick --version” in the terminal to see which version I am running - which shows me that IM is installed correctly.
With “phpinfo();” it also confirms to me that IM is available for PHP. In the config.php, “driver’ => 'im” is entered.

I develop local and start Kirby with ‘php -S 127.0.0.1:8000 kirby/router.php’.
My problem now is that IM just doesn’t “want” to work. When I call up a Kirby page with a before deleted media folder, the corresponding directory in the media folder is recreated, but only with .json files in the .jobs directory. The actual images with my thumbs() settings are not generated.

If I remove “driver’ => 'im”, then everything works without problems. What am I doing wrong in the combination of “php -S …” and ImageMagick on a Windows system?

You probably have to add the path to the binary:

Hello… thank you for your answer.

I know this link and I have already tried a few things here. If I enter “which convert” in the GitBash under Windows, I get the answer “/c/WINDOWS/system32/convert”. I have then also entered this in "‘bin’ => ‘/c/WINDOWS/system32/convert’ - in different path notations. Unfortunately, all without success.

In the directory “C:\Program Files\ImageMagick-7.1.1-Q16-HDRI” I cannot find a “bin” or “convert” folder either.

Unfortunately, I don’t know what to do here.

Is the PHP exec() method enabled in your PHP configuration?

If I have understood this correctly, then the “exec()” method is allowed if it is not listed in the php.ini under “disable_functions =” - right? If yes, then “exec()” is allowed.

Since the exec() function is called in a Windows cmd environment, you might need to test this in a cmd window, not GitBash. If you do try to execute convert in a cmd window and the convert program is not found, then this might the reason. Try to figure out the full path in a cmd window and use this as the value to bin.

Thank you very much for your objection…
This
'bin' => 'C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe',
works. :+1:t2:

Also note that as far as I know, Kirby is intended to be used with the imagemagick legacy command parser (the one from IM version 6, not 7).
By using the magick command, instead of the convert utility you activate the imagemagick 7 command parser which changes some things. Kirby makes a fairly simple use of imagemagick, so it might not actually change anything for you, but to be on the safe side, I’d point the bin path to the convert utility:

'bin' => 'C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\convert.exe',

There is no “convert.exe” in my installation path. I had already searched for it, but could not find a corresponding file.

It should be included in the “portable” version of imagemagick: https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-11-portable-Q16-HDRI-x64.zip

Or choose the correct zip for your architecture from here: ImageMagick – Download

Thank you very much rasteiner! The portable version works perfect. Here I can find the convert.exe.
:+1:t2: :grinning: