Upgraded to Kirby 3 from Kirby 2, images not working, nothing in media folder

The folder structure is being created in the media folder, but the actual images are not there. No files.

No errors when uploading to the panel, but once uploaded the thumbnails show a broken image link and trying to view the properties of the uploaded image results in the below

I’m on nginx and php 7.4

Which driver are you using, gd or im?
Are the json job files created in the media folder?
Is there any more information in the browser console?

I’m on default, using gd

(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] =>
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] =>
    [XBM Support] => 1
    [WebP Support] =>
    [BMP Support] => 1
    [TGA Read Support] => 1
    [JIS-mapped Japanese Font Support] =>
)

The job files are created

-rw-r--r-- 1 warchamp warchamp   42 Jun 22 02:10 icon-1408x.jpg.json
-rw-r--r-- 1 warchamp warchamp   41 Jun 22 02:10 icon-352x.jpg.json
-rw-r--r-- 1 warchamp warchamp   68 Jun 22 02:10 icon-38x38.jpg.json
-rw-r--r-- 1 warchamp warchamp   68 Jun 22 02:10 icon-76x76.jpg.json
-rw-r--r-- 1 warchamp warchamp   41 Jun 22 02:10 icon-864x.jpg.json

Nothing in browser console

Where does this information come from?

phpinfo

php -r "print_r(gd_info());"

What is weird is the error message “The JSON response from the API could not be parsed” which usually points to some other issue.

What happens on the frontend when you try to output a thumb/the original image? Do you get the original image or also an error? Usually, when thumbs don’t work, Kirby should fall back the providing (and copying to the media folder) the original image.

There’s no images at all in my media folder no matter what I do.

Outputting a file URL on the frontend generates a link to the media folder, which 404s

$page->files()->first()->url()

https://mysite.com/media/pages/team/warchamp7/7be10dc3e9-1624325810/chibibrs_2-128.jpg

Ok, that means we don’t really have an issue with thumbs, but with files not being copied to the media folder at all, although it seems to be writable (general structure is created and also the job files).

And I guess there is also the panel folder with the relevant files?

Yes, there is a panel folder under media with files in it

Figured it out after realizing that the panel URL itself was also 404’ing

Ex.
https://mysite.com/panel/pages/test/files/dzrcjf0wsaeog3b.jpg

I had an error in my nginx config for image files

        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
                access_log off;
                expires 30d;
        }

This config is fine when that URL is an actual file, but within Kirby that is a now php page, not an image

Solved by adding an appropriate try_files to that block

        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
                try_files $uri $uri/ /index.php$is_args$args;

                access_log off;
                expires 30d;
        }