# Php Server, ImageMagick on Windows

**URL:** <https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 2, 2023, 1:32pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725 "2023-06-02T13:32:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 2, 2023, 1:32pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/1 "2023-06-02T13:32:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [June 2, 2023, 1:36pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/2 "2023-06-02T13:36:52Z")

</div>

You probably have to add the path to the binary:

> **[thumbs](https://getkirby.com/docs/reference/system/options/thumbs#thumbs-driver__additional-options-for-the-imagemagick-driver)**
>
> Set default configuration for thumbs

---

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 5, 2023, 10:00am UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/3 "2023-06-05T10:00:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 5, 2023, 10:07am UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/4 "2023-06-05T10:07:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 5, 2023, 11:13am UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/5 "2023-06-05T11:13:13Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/5/545ff57edacb17366ef19585510ce1ed29a34ecb.png)

---

<div class="post-metadata">

**Author:** ![Adspectus](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adspectus/32/189_2.png) [@Adspectus](https://forum.getkirby.com/u/Adspectus)\
**Post date:** [June 5, 2023, 12:48pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/6 "2023-06-05T12:48:34Z")

</div>

> [@Cashew](#):
>
> If I enter “which convert” in the GitBash under Windows, I get the answer “/c/WINDOWS/system32/convert”

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

---

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 5, 2023, 1:57pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/7 "2023-06-05T13:57:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rasteiner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rasteiner/32/4788_2.png) [@rasteiner](https://forum.getkirby.com/u/rasteiner)\
**Post date:** [June 5, 2023, 2:23pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/8 "2023-06-05T14:23:15Z")

</div>

> [@Cashew](#):
>
> ImageMagick-7.1.1-Q16-HDRI

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](https://imagemagick.org/script/porting.php#:~:text=Shell%20API%20or%20Command%2Dline%20Interface). 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:

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

```

---

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 5, 2023, 3:06pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/9 "2023-06-05T15:06:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rasteiner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/rasteiner/32/4788_2.png) [@rasteiner](https://forum.getkirby.com/u/rasteiner)\
**Post date:** [June 5, 2023, 3:54pm UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/10 "2023-06-05T15:54:47Z")

</div>

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](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](https://imagemagick.org/script/download.php#windows)

---

<div class="post-metadata">

**Author:** ![Cashew](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@Cashew](https://forum.getkirby.com/u/Cashew)\
**Post date:** [June 6, 2023, 10:35am UTC](https://forum.getkirby.com/t/php-server-imagemagick-on-windows/28725/11 "2023-06-06T10:35:57Z")

</div>

Thank you very much rasteiner! The portable version works perfect. Here I can find the **convert.exe**.  
👍🏻 😀
