Image error on first load

Hi,

I have the problem that after I upload new images to my Kirby instance, when I first load the page with the images in question, most or all of them do not show correctly. Instead the “broken image source” icon is displayed.

Today I checked out the new Kirby demo and found the same problem there. When I create a new demo instance on first load not all images are loaded correctly. From the second load onward everything works fine.

I realize that there are already other topics in this forum which deal with similar problems. However none of them solved the problem for me. So could you please fix the problem on the demo server and post the solution? I hope this will also fix the problem for me.

Firefox 72.0.2 on macOS 10.13.6

Have you also tried with another browser? I played around with the demo uploading images and can’t reproduce your issues, not even when uploading multiple images at once. So wondering what might be causing this and trying to rule out things.

I experienced the same issue with one single image the first time I loaded the demo.
Couldn’t reproduce it yet.

@texnixe I just tried with Chrome 79.0.3945.130. The first time I opened a new demo instance in an incognito window all images showed correctly. Afterwards I closed the incognito window, opened a new one and opened a new demo instance I got similar results as in Firefox:

Please note that this happens straight after creating/opening a new demo instance’s home page. No need to upload any images to reproduce this!

@mshoestrng Ok, I could reproduce it once now when the demo took a while to load. Images in the demo are coming from a CDN, but if we still have a bottleneck, we certainly have to look into this.

What sort of error do you get in your network tab?

@lukasbestle?

I suspect that this issue in the demo is caused by the CDN, not by Kirby itself. I have forwarded this thread to @bastianallgeier so that he can take a look.

@texnixe It’s error 500:

I’m not sure, but I think in my own Kirby install it was error 404 which seem similar to StarterKit : images display only after reload page in the browser and Problem with Image cache

So these might be two different problems.

Thanks for the screenshot, that will be helpful when debugging this.

I’m pretty sure that those are indeed two different issues as the HTTP 500 comes from KeyCDN in this case. We are on it. :slight_smile:

Hello,

I stumbled also upon this issue.

The problem occurs random and when I look in the devtools all images have status code 200 whilst on the frontend a broken image is shown.

The livesite is https://sanube.at/.

1 Like

@boinsn I clicked through quite a few pages and couldn’t see it happen for the moment. Also, the images are rather small and by now, I guess most of the thumbs should exist in the media folder.

Don’t know what to do or advise at the moment. Maybe also check browser console when this happens or PHP error logs.

Thanks @texnixe, I checked the error logs but they are empty. It’s strange as I checked the site now everything seems to work fine. I keep an eye on the website.

@boinsn @texnixe I think you are experiencing the same problem as I did in Thumbnails broken on first load

Unfortunately, there is still no response from anyone on this issue…