StarterKit : images display only after reload page in the browser

#1

Hi,

I have deploy the starterkit package on Nginx with php 7.2. The installation is ok but i have a little bug with images.

After delete media directory for regenerating files, when i launch the homepage or anyone page with image, this one is not displaying.

I must reload page for show image

The images is generated after at the first load of the page, i think is normal behavior, but the page is not supposed to waiting request of generating image for loading in browser ?

My Nginx configuration :

   location / {
            try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
            try_files $uri = 404;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }

Anyone have idea ?

Thanks,

0 Likes

Problem with Image cache
#2

hello, have you solved your problem?

if not, this could be a permission problem.
check the user who is running the application.

ps aux | grep nginx

check the user who is having the file permissions.

ls -la

maybe the rights do not match.

the host conf snippet seems okay.

good luck

0 Likes

#3

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

0 Likes

#4

How much ram is allocated to PHP on the Raspberry?

0 Likes

#5

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.

0 Likes

#6

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

0 Likes

#7

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 ?

0 Likes

#8

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.

0 Likes

Problem with Image cache
#9

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.

0 Likes

#10

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

#11

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
    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

0 Likes

Problem with Image cache
#12

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

0 Likes

#13

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.

0 Likes