# Image-\>resize() not working

**URL:** <https://forum.getkirby.com/t/image-resize-not-working/19556>\
**Category:** Questions\
**Tags:** v3\
**Created:** [September 29, 2020, 10:10am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556 "2020-09-29T10:10:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_L](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tobias_l/32/9723_2.png) [@Tobias\_L](https://forum.getkirby.com/u/Tobias_L)\
**Post date:** [September 29, 2020, 10:10am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/1 "2020-09-29T10:10:31Z")

</div>

I just migrated a dev page to a live page and apparently the image-\>resize() function does not work anymore. PHP is set to 7.4.10 – my guess is that the hosting company hasn’t enabled the PHP proper module though. (Server API says FPM/FastCGI)

Phpinfo() is not showing any results when searching the page for “GD” (only the authors section) or when searching for “Imagick”.

Is Kirby using GD or Imagick so that I can ask the company for activating the proper module?

Thx!

---

<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:** [September 29, 2020, 10:24am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/2 "2020-09-29T10:24:16Z")

</div>

The requirement is for the gd library to be present, see the documentation: [https://getkirby.com/docs/guide/quickstart#requirements](https://getkirby.com/docs/guide/quickstart#requirements)

Imagagick is an alternative that you can use instead of gd, if it is supported by the server. You would have to set the thumbs driver to im in config in that case.

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

---

<div class="post-metadata">

**Author:** ![Tobias\_L](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tobias_l/32/9723_2.png) [@Tobias\_L](https://forum.getkirby.com/u/Tobias_L)\
**Post date:** [September 29, 2020, 10:27am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/3 "2020-09-29T10:27:23Z")

</div>

Ok, thanks! Silly question, but is it actually standard to have the GD library be present or would it be an unusual request to the hosting company?

---

<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:** [September 29, 2020, 10:28am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/4 "2020-09-29T10:28:14Z")

</div>

> [@Tobias\_L](#):
>
> but is it actually standard to have the GD library be present or would it be an unusual request to the hosting company?

That is actually standard or should be. All CMSs depend on an image modification library.

---

<div class="post-metadata">

**Author:** ![Tobias\_L](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tobias_l/32/9723_2.png) [@Tobias\_L](https://forum.getkirby.com/u/Tobias_L)\
**Post date:** [September 29, 2020, 10:29am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/5 "2020-09-29T10:29:14Z")

</div>

OK thanks again!

---

<div class="post-metadata">

**Author:** ![jash](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jash/32/2173_2.png) [@jash](https://forum.getkirby.com/u/jash)\
**Post date:** [March 19, 2021, 4:05pm UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/6 "2021-03-19T16:05:26Z")

</div>

I’m using MAMP Pro on the Mac with PHP 8, but `image->resize()` didn’t work (no error, but images keeps original size). My quick solution was simply to set MAMP Pro back to PHP 7.4. After that `image->resize()` worked instantly again, without any further configuration of PHP.

---

<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:** [March 19, 2021, 4:37pm UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/7 "2021-03-19T16:37:01Z")

</div>

> [@jash](#):
>
> My quick solution was simply to set MAMP Pro back to PHP 7.4.

Probably worth looking into why it’s not working. Check phpinfo() if gd/imagemagick is enabled and what is set in your config. (With my MAMP Pro version 6.3.1 and PHP 8 it works)

---

<div class="post-metadata">

**Author:** ![jash](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jash/32/2173_2.png) [@jash](https://forum.getkirby.com/u/jash)\
**Post date:** [March 19, 2021, 8:52pm UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/8 "2021-03-19T20:52:50Z")

</div>

You right - i will invest some time to this topic later 😉 Just a quick note, that I use a fresh install from MAMP Pro 6.3.1. So in my case it did not work out of the box.

---

<div class="post-metadata">

**Author:** ![seriamlo](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@seriamlo](https://forum.getkirby.com/u/seriamlo)\
**Post date:** [May 2, 2021, 5:09pm UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/9 "2021-05-02T17:09:17Z")

</div>

I have the same problem. MAMP 6.3 and PHP 8 but researching the web gives tells me that MAMP on OS X misses Gd on php 8 and I have no idea how to add it.

Images get the correct filename like filename-400-400-60.jpg but they are not cropped or resized…

Anyway when switching back to php 7.4.12 It works.  
I wonder though if anyone got php8 and MAMP with GD running.

Cheers

---

<div class="post-metadata">

**Author:** ![mcbrwr](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mcbrwr/32/1783_2.png) [@mcbrwr](https://forum.getkirby.com/u/mcbrwr)\
**Post date:** [May 17, 2021, 5:48am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/10 "2021-05-17T05:48:07Z")

</div>

odd thing… I had the same issue: Mac + latest MAMP Pro, tried all PHP versions (7.x, 8.x) and no resizing or cropping. I rebooted and it worked on all PHP versions. Not the most elegant thing to try, but still, I’d recommend trying a reboot 😃

---

<div class="post-metadata">

**Author:** ![GB\_DESIGN](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gb_design/32/14956_2.png) [@GB\_DESIGN](https://forum.getkirby.com/u/GB_DESIGN)\
**Post date:** [September 18, 2023, 7:02am UTC](https://forum.getkirby.com/t/image-resize-not-working/19556/11 "2023-09-18T07:02:59Z")

</div>

I had a similar problem that my `favicon.png` was not scaled. Other images were scaled with `resize()`. I resaved and replaced the `favicon.png` and suddenly `resize()` worked. Possibly it was due to an embedded color profile or meta tags in the `.png`

```auto
<?php if($favicon = $site->favicon()->toFile()): ?>
<link rel="apple-touch-icon" sizes="180x180" href="<?= $favicon->resize(180)->url() ?>" />
<link rel="icon" type="image/png" href="<?= $favicon->resize(196)->url() ?>" sizes="196x196" />
<link rel="icon" type="image/png" href="<?= $favicon->resize(96)->url() ?>" sizes="96x96" />
<link rel="icon" type="image/png" href="<?= $favicon->resize(32)->url() ?>" sizes="32x32" />
<link rel="icon" type="image/png" href="<?= $favicon->resize(16)->url() ?>" sizes="16x16" />
<meta name="msapplication-TileImage" content="<?= $favicon->resize(150)->url() ?>" />
<?php endif ?>

```
