Generate thumbs programmatically with Media::thumb() in Kirby 3.9

I updated a project from Kirby 3.8.4 to 3.9.7 where I use Media::thumb() to convert .jobs files in the media folder to thumbnails. I have to do this manually, because I set up a firewall which protects the media/pages folder via .htaccess. All the files get served by a custom route.

Long story short:
As long as I use 3.8.4 everything works fine, but as soon as I switch to 3.9.7 Kirby doesn’t generate the thumbnails anymore. It’s possible to switch back and forth between these versions and to reproduce the issue.

  • I compared the Media::thumb() method between these to versions, but couldn’t find any changes.
  • I also checked all the variables I pass to the method. Seem still to be correct.
  • The .jobs files are in place and ok.
  • I am aware of the recipe “Protecting files behind a firewall”, but my setup differs.
  • I checked the release notes for 3.9, too.

Maybe I should test with v4 as well!?

Hi Flo, could you post the code you are using. I just tried something manually to debug, and this code at least generated the thumb and removed the job:

$page = page('notes/a-night-in-the-forest');
$file = $page->file('forest.jpg');

Media::thumb($page, $file->mediaHash(), 'forest-38x38-crop.jpg');

Wouldn’t know either what has changed. Do you have a chance to debug?

Thanks for your reply @texnixe! I tried to debug yesterday but it was quite late :sweat_smile:

I will check it out with your example.