StarterKit : images display only after reload page in the browser

For another testing, i have deploy on a VPS instance with same configuration (Nginx + PHP 7.2) That work correctly.

My problem is on my Rasberry (Using for devlopement) with same configuration (Nginx + PHP7.2), From your last message, i have verify the access rights on directorys, i have always the problem after update user / group on directorys.

Do you think 1GB on rasbery can be is the problem ?

This afternoon i go compare Phpinfo on Rasberry and the VPS instance, because except the OS i don’t see where is difference configuration for this problem.

Thanks

How much ram is allocated to PHP on the Raspberry?

I have try different tests with the VPS instance and the Raspberry.

Firstly, the VPS instance has php 7.2 and 7.1 and my kirby directory use the 7.1-fpm version in the Nginx config.

So, i have install the 7.1 version on the Raspberry with same config on the php.ini but the problem with loading image stay similar.

I have 128m memory allocated to php on the VPS and Raspberry

I see new release for Kirby is avaible (3.1.1 -> 3.1.2) i think is not the solution but i go try it.

Does the Rasperry actually generate the thumbs at the right size?

Yes image is generated with the right size but after reload the page, on the first load, on chrome i have 404 error on image url.

I think Kirby allow request of page before the thumbs generating is finished

A option for generate all media cache in the backend exist ?

No, you’d need a crawler that goes through all pages and all src/srcset/data-src attributes to generate all thumbs at all sizes.

Thanks for information,

If anyone succeeds to install Kirby on Raspberry, i’m interested :wink:

For the next days i go reinstall the Raspberry to deploy with Apache configuration and see if that correct my problem.

I think you can also go through the media folder and use the information in the .json files in the .jobs folders. All information about intended thumbs should be there.

1 Like

Reply from this post : Problem with Image cache - #13 by texnixe

True, i go to try soon with Apache for see
|

I don’t know how i can verify
|

Personnaly, i use default images of starter kit
|

I support this functional choice, it is standard to most cache systems
|

Step by step :

  1. I delete the media directory, i go to load the page

  1. I look the source and see 404 error on the image
    k2

  1. I go verify on the media folder on the server, the image has been generated

  1. I reload the page, the image is here and no 404 error

You might want to check if this solution also works for you on Nginx: No thumbnails generated on Nginx

Finally it works ! :slight_smile:

I have try with apache and i had same problem. Strangely I did not have the mention GD in my phpinfo (), so i have install it.

The starterkit work fine now, but i don’t know why PHP could generate the images on reload without GD library.

A bit late, but my experience is hardly related and the solution might be useful for others, too.

I experienced that medias served for the very first time were “polluted” with a preceding newline character. Amongst others, this lead to broken image files served with a 200 HTTP Code . Due to caching headers sent by my provider’s server, these files we not reloaded for some time and the broken images were used instead.

The superfluous newline character was introduced by one of my plugin’s files starting with a newline followed by the <?php tag. Removing the newline solved the issue.

I have the same problem, the images are only displayed after reloading the page.

After deleting the contents of the media folder (bad idea).

I have to go back to each page and reload for it to generate the images for me.

However, they have the status 200.

I’m on kirby 3.8.2.

The problem arises on the local in mamp php 8 and on the server (apache) with php 8.1.

Is there a command to tell kirby to browse the whole site to generate all the images?

How about using the Janitor plugin: GitHub - bnomei/kirby3-janitor: Kirby 3 Plugin for running commands like cleaning the cache from within the Panel, PHP code, CLI or a cronjob

It has a method to generate all thumbs.

I will try this plugin.

On the other hand, what is strange is that if I take a starterkit in 3.8.3 and I delete the media folder. The images are displayed immediately.

Whereas on my project it is necessary to reload the page. Surely there is a problem somewhere.

I don’t think there is a difference between 3.8.2 and 3.8.3 regarding thumbs.

Do you use any plugins in your project?

I found the culprit. As soon as I remove the “programmable-blueprints” plugin folder.

Pictures work.

Interesting. Can’t reproduce this in a Starterkit though.

Okay. I manage to reproduce the problem with a starterkit 3.8.3.

Probably something wrong in the /blueprints folder in a site.xxx.yml file

It’s strange, as soon as I create an empty plugins/programmable-blueprints folder, it prevents the images from loading