Panel Cannot Open Images for Editing on Hostinger

Hello,

I’m experiencing an issue with Kirby 5 on my Hostinger server.

  • Frontend works perfectly — images are displayed and thumbnails are generated correctly.

  • On my local MAMP Pro setup, everything works as expected, including editing images in the Panel.

  • On Hostinger, however, when I click on any image inside an album to edit it, I get the error: “Invalid source image.”

  • This happens even with newly created test albums containing a single image.

  • Permissions for content/, site/, media/, and site/sessions/ are all correct (755 for folders, 644 for files).

  • Imagick is enabled and working fine; thumbnails are generated properly.

  • The .txt files for pages are present, and templates are defined.

  • Some album slugs contain a + sign (e.g., gallery+landscape), which might be affecting route resolution in the Panel.

I suspect this might be related to Panel route resolution, blueprints, or server-specific configuration on Hostinger.

Could you please advise how to resolve this so that images in the Panel can be opened and edited properly?

Thank you for your help.

What do you see in dev tools, a) in the network tab, b) in console?

422 (Unprocessable Content) in console. Empty page with “Invalid source image“ message and url like this: panel/pages/gallery+landscape/files/img_7049.jpg

BTW, I just set up a brand-new Kirby 5.0.4 on the same Hostinger hosting under a different domain and ran into the same issues. Can’t edit images or note covers in the Panel. The frontend still works perfectly though.

Error: Failed to load resource: the server responded with a status of 422 ()Understand this error
Message on top of a page: Invalid source image

I found this thread, and seems to have to do with Hostinger in particular: Issue with panel image pages on litespeed based hosting - #9 by bastianallgeier

In fact, I’m using the permanent domain name. If this were a Hostinger-only issue, we’d probably see hundreds of posts like mine. So what can I do? I have a licensed Kirby and can’t use it properly on my hosting?

I’ve double-checked phpinfo and Imagick is enabled on the server. Moreover, there are two WordPress websites running on the same server, which are obviously using Imagick to crop images.

Please, see the last logs

[25-Aug-2025 16:05:48 UTC] Error: Call to undefined function Kirby\Image\Darkroom\exec() in /kirby/src/Image/Darkroom/ImageMagick.php:136
Stack trace:
#0 /kirby/config/components.php(363): Kirby\Image\Darkroom\ImageMagick->process()
#1 /kirby/src/Cms/App.php(1649): Kirby\Cms\Core->{closure}()
#2 /kirby/src/Cms/Media.php(150): Kirby\Cms\App->thumb()
#3 /kirby/src/Cms/Media.php(61): Kirby\Cms\Media::thumb()
#4 /kirby/config/routes.php(89): Kirby\Cms\Media::link()
#5 [internal function]: Kirby\Http\Route->{closure}()
#6 /kirby/src/Http/Router.php(122): Closure->call()
#7 /kirby/src/Cms/App.php(342): Kirby\Http\Router->call()
#8 /kirby/src/Cms/App.php(1195): Kirby\Cms\App->call()
#9 /index.php(5): Kirby\Cms\App->render()

Imagick is a PHP extension and is not needed.

If you use the im driver, you need the ImageMagick library on the server.

This points to exec() not being enabled on the server. Kirby uses exec() to call the ImageMagick convert command on the command line.

Please try switching to the gd library to check if this solves the issue.

I’ve asked Hostinger support to enable exec()…no luck, the same error. Cache was cleaned totally before testing.

Changed to GD, absolutely the same thing

‘thumbs’ => [
‘driver’ => ‘gd’,
‘format’ => ‘webp’,
‘presets’ => [
‘large’ => [‘width’ => 1800, ‘quality’ => 80],
‘medium’ => [‘width’ => 900, ‘quality’ => 80],
‘small’ => [‘width’ => 450, ‘quality’ => 80],
‘lqip’ => [‘width’ => 30, ‘quality’ => 40, ‘blur’ => true]
]
],

Could you please support me. My issue isn’t resolved

Kirby + Hostinger Setup Tip

Just a quick note for anyone trying to run Kirby on Hostinger and running into Panel issues (like not being able to edit image covers, posts, etc.):

:white_check_mark: This is not a Kirby problem — Kirby itself works perfectly. The issue comes from Hostinger’s setup. Once I made the right adjustments, everything ran great.

Here’s what you need to do on Hostinger:

  1. Ask Hostinger Support to disable CDN image optimization for your domain (their built-in optimization conflicts with Kirby’s image handling).

  2. Use GD as the thumbs driver in your config.php (Imagick doesn’t behave reliably on Hostinger).

  3. Make sure PHP exec() is enabled on your hosting plan.

Once these are in place, the Panel works normally and Kirby is a joy to use :rocket:

:backhand_index_pointing_right: Kirby is awesome! The hiccup here is Hostinger’s defaults, not Kirby itself. If you’re on Hostinger, just ask support for these changes and you’re good to go.

Some clarification is needed here:

  • exec() is only needed if you use ImageMagick
  • Kirby does not use Imagick, but ImageMagick (a command line tool) for the im thumb driver. To use the im driver, ImageMagick needs to be installed on the server.

Thanks for clarifying :folded_hands: — that makes sense now.

In my case on Hostinger, even though ImageMagick is technically installed and exec() enabled, it doesn’t behave properly with Kirby’s im thumb driver (probably due to their setup and restrictions). The Panel only started working correctly after:

  • switching to GD as the thumb driver,

  • asking Hostinger support to disable their CDN image optimization for my domain.

So yes, you’re right: exec() is only relevant if using the im driver. But since Hostinger’s ImageMagick setup is unreliable, the safer path (at least on their shared hosting) is to go with GD.

Kirby itself is rock-solid. It was 100% a Hostinger quirk.