I’ve recently cloned a site to test and update to Kirby CMS 3.9, however, after I deleted the media folder the recreated folder now serves pixelated images.
Thanks, but the media folder is regenerating the same pixelated assets. If the issue is not with the media folder I need to determine where the issue is originating.
The rendered and intrinsic size of the images has remained the same as the origin site, however, the file size of the original image is 157kb vs the pixelated version which is 7kb, so I wonder what might be causing that across the board?
Please post the relevant thumb config settings from all of your config files. And the code to render the thumbs. The size of the original images might be interesting as well.
I don’t really think this is an issue with the Kirby update, but rather some Kirby configuration or server config issue.
I don’t actually have any specified in my config file. Sorry, I inherited this site from a former developer. Any tips on where I might find these if not in the config.php?
When I had this issue this even happened with the panel thumbnails. So I think this might rather depend on a server config issue, maybe clashing with specific image metadata (as it was not happening with all images in my case). Size of the images was nothing extra-ordinary, like 1-2 MB in file size.
This seems to suggest that there’s something unusual with some images.
Could you share one of the original files that gets messed up? I guess it would help being able to replicate the issue, or at least being able to exclude them as the source of the problem. Maybe GDLib has some trouble reading those files.
edit2: yeah, so… actually the ones that aren’t pixelated are in png format… So my guess is that for some reason the thumbnail driver is receiving a 'quality' => 0 (or similar) setting for some reason (this obviously doesn’t affect the PNG images).
edit3: I’ve done some tests, and setting 'quality' => 0 does have the same effect on the images as the one we see on your site. What’s strange, though, is that normally such a setting would be reflected in the filename of the produced thumbnail (with a -q0 suffix), and your images don’t have that. There’s definitely something fishy going on.
edit4:
… unless the setting is specified in the config.
Are you really sure you’re not specifying anything about thumbs in the config files? (config.php, env.php, etc?). I mean, a config like this creates pixelated images:
<?php
return [
'thumbs' => [
'quality' => true // will be typecast to 1 (out of 100)
]
];
edit5: A few tests later. What changed between 3.7.4 and 3.9 is that a config like:
'quality' => null
was ignored in Kirby 3.7, but gets interpreted as 'quality' => 0 in 3.9. That would explain stuff.
Given the circumstances I’d point my finger there.
If you really don’t have anything in your config files, maybe there’s a plugin which does something to the config. What plugins do you have installed?