Issue with panel image pages on litespeed based hosting

Hi,

I cannot access panel image pages on my remote hosting (where you can normally adjust image focus point and edit metadata defined in field blueprint).

This is only happening with some extensions (.png and .jpeg), other file types work (.webp and .gif work for examples).

Everything works fine in local environment, the issue happens on a remote Hostinger server based on litespeed. I have no server error logs to provide.

The issue is still happening with the plainkit.

Accessing images directly works fine.

Visiting urls such as https://remoteurl.com/panel/pages/somepage/files/somefile.png returns “Invalid source image” on the webpage and a 422 Unprocessable Content error.

The 422 stops when I prevent such requests from reaching this point in the .htaccess (but I then get a 404) :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

Has anyone ever encounter such an issue with any hosting ? Thank’s in advance

1 Like

I’m running into the same issue right now with Kirby on Hostinger, running PHP 8.2 and 8.3.

Did you end up finding a fix for this?

The only other thread I could find about this was “invalid-source-image-error-on-admin-panel-on-hostinger-server/32432”, but it seems to have been deleted or made private :confused:

If a Kirby admin is reading this, can you please check and share if there was any useful info in that thread? :pray:

The problem stopped occurring when I changed the domain associated with the hosting, I cannot explain why.

Hostinger support could not explain the problem either.

1 Like

Interesting, thank you!

Were you using their temporary domain when it wasn’t working? Or was the issue happening even on a custom domain?

I’m currently using their temporary domain and I’m hoping switching to a custom domain will solve this :crossed_fingers:

UPDATE: this indeed did fix the issue! :partying_face:

Both domains I used were custom ones which were “parked” from other providers (the one that did not work was from Infomaniak, the one that worked was from OVH).

1 Like

Glad it also worked for you !

1 Like

Same, I’m now also using a parked domain outside of Hostinger.

We can add NameCheap to the list of providers that works :white_check_mark:

I’m not really sure why the original thread was marked as spam, but the problem seems to be happening more often on Hostinger and the last time I debugged it, it seemed to be connected to their CDN. They seem to be running GitHub - imgproxy/imgproxy: Fast and secure standalone server for resizing and converting remote images there in some form, which produces those errors for URLs that look like images, but aren’t really. In this case, the Panel URL has an image file extension but is actually a regular Kirby Panel route. The imgproxy seems to intercept that and then break because it’s not actually an image.