StarterKit : images display only after reload page in the browser

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

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

  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 file

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

Can you reproduce this in a fresh Starterkit?

I uploaded a new starterkit


  1. I created a folder programmable-blueprints with an index.php which contains:

use Kirby\Cms\App as Kirby;

Kirby::plugin('cookbook/programmable-blueprints', [
    'blueprints' => [
        'site' => function () {
            if (($user = kirby()->user()) && $user->isAdmin()) {
                return Data::read(__DIR__ . '/blueprints/site.admin.yml');

in the plugins/programmable-blueprints/blueprints/site.admin.yml folder I copied what was in site/blueprints/site.yml

  1. If I rename: plugins/programmable-blueprints to plugins/_programmable-blueprints everything works.

this plugin is essential to make the programmable-blueprints plugin work?

No, not for the example we are discussing here.

But as I already wrote above, I cannot reproduce the issue you have with the programmable-blueprints plugin in my environment (MacOS Ventura, Laravel valet, PHP 8.0.23, Firefox)