Problem with thumbnails generation in Kirby 5 (Panel & Frontend)

Hello,

I’m running into an issue with Kirby 5.
When I upload new images, the thumbnails (both in the panel and on the frontend) are not generated immediately. I need to refresh the page before they appear.

It seems like the thumbnail only gets generated once the image is explicitly requested.

This happens on my first Kirby 5 site (both locally and online), but I never had this problem on my previous sites with Kirby 4 or 3.

I’ve tried several things already (checking media folder permissions, deleting the media folder, switching from GD to Imagick), but nothing seems to fix it.

Has anyone experienced this or knows how to solve it?

===

first time but after refresh it’s ok.

Can you reproduce it in a fresh Starterkit?

I just found it. I had left a blank character at the beginning of a model file…