# Thumb() not outputting anything

**URL:** <https://forum.getkirby.com/t/thumb-not-outputting-anything/28326>\
**Category:** Questions\
**Tags:** v3\
**Created:** [April 7, 2023, 11:13am UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326 "2023-04-07T11:13:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 7, 2023, 11:13am UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/1 "2023-04-07T11:13:23Z")

</div>

Having huge trouble getting images generated succesfully, my site seems to be falling back to the images in the content folders rather then the media folder.

I have confirmed that Imagemagic is installed correctly on the server. If i do the following in the plainkit, i succesfully get WebP and Avif files…

```php
$i = $page->image('echo-ridge-hero.jpg')->realpath();

$imagick = new \Imagick();
$imagick->readImage($i);
$imagick->setImageFormat('avif');
$imagick->writeImage('im_echo-ridge-hero.avif');

$imagick->setImageFormat('webp');
$imagick->writeImage('im_echo-ridge-hero.webp');

```

However, none of these result in files in the media folder:

```php
<?= $page->image('echo-ridge-hero.jpg')->thumb(['width' => 505, 'height' => null, 'format' => 'avif'])->url() ?>

<?= $page->image('echo-ridge-hero.jpg')->thumb(['width' => 505, 'height' => null, 'format' => 'webp'])->url() ?>

<?= $page->image('echo-ridge-hero.jpg')->thumb(['width' => 505, 'height' => null, 'format' => 'jpg'])->url() ?>

```

I do get the path echoed on the page, but all thats in the media folder is the job json files.

There isnt anything in the error logs. I am a bit stumped here. Any idea what is going on? Everything works great locally.

---

<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:** [April 7, 2023, 11:18am UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/2 "2023-04-07T11:18:15Z")

</div>

If you don’t get any thumbs on the server, maybe the `exec()` PHP method is blocked.

Kirby doesn’t use the PHP Imagick extension because that’s often not available, but executes the ImageMagick binary on the command line via the `exec()` method.

ImageMagick.php #141:

```auto
exec($command, $output, $return);

```

Having said that: Have you set the path to the `convert` binary in your config?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 7, 2023, 11:30am UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/3 "2023-04-07T11:30:23Z")

</div>

Hrmm… ok so `exec()`wasl in the list of disallowed functions, and ive now removed it from the list which looks like:

```auto
system,system_exec,shell,shell_exec,symlink,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,proc_get_status,proc_nice,proc_terminate,highlight_file,define_syslog_variables,posix_uname,posix_getpwuid,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,ini_restore,inject_code,define_syslog_variables,apache_setenv,eval,phpAds_XmlRpc,phpAds_remoteInfo,phpAds_xmlrpcEncode,phpAds_xmlrpcDecode,xmlrpc_entity_decode

```

I have also explicitly set the bin path in the config.

Trouble im still not getting any images ☹

---

<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:** [April 7, 2023, 12:05pm UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/4 "2023-04-07T12:05:32Z")

</div>

> [@jimbobrjames](#):
>
> `escapeshellarg`

This needs to be enabled as well.

Make sure to restart the server after applying these changes (if it’s not shared hosting).

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 7, 2023, 12:11pm UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/5 "2023-04-07T12:11:50Z")

</div>

Have removed `escapeshellarg` as well now…Still nothing ☹

I guess i need to talk to the host now to see if anything is stopping `exec()` from working?

---

<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:** [April 7, 2023, 12:19pm UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/6 "2023-04-07T12:19:43Z")

</div>

> [@jimbobrjames](#):
>
> I guess i need to talk to the host now to see if anything is stopping `exec()` from working?

Guess so, maybe it’s not even possible to enable it.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 7, 2023, 12:21pm UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/7 "2023-04-07T12:21:26Z")

</div>

In the hosting control panel, there is a list of diabled functions for security reasons, and it says remove them from the list if you need one.

Will have to file a support ticket. My hosts online support chat is closed until Tuesday due to the Easter holiday ☹

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [April 7, 2023, 12:27pm UTC](https://forum.getkirby.com/t/thumb-not-outputting-anything/28326/8 "2023-04-07T12:27:38Z")

</div>

Ah ha! Seems to have suddenly kicked in. I am now getting Avifs generated. Thanks alot @texnixe 🙂
