Problem with Image cache

#1

I have a question, my site has a weird behavior regarding cache images, as the first load images are not being displayed, after that the images seem to be cached and displayed as expected. It means once I update an image to the site, I have to go myself and open all the pages, so Kirby can cache them (?)

Is it some know behavior? do I need some plugin to “pre-cache” the images? or my Kirby might be corrupted?

0 Likes

#2

There was a similar question asked a few days ago - I don’t suppose you are running it on Nginx? A fix was suggested but not yet confirmed that it helped.

In general, it’s a good idea to check that all the files were successfully transferred to the server, file and folder permissions are correct and its best to use PHP 7.1+

0 Likes

#3

It’s required to use PHP 7.1+.

Kirby doesn’t cache images, images are published/created in the media folder on the fly when their URL is called in the browser.

You don’t need a plugin or anything else.

Where is that happening, on your local dev system or on a remote server? Could you please provide more information about your environment?

0 Likes

#4

I do have all the requirements but still, anyways thanks for pointed that out, I will follow up the thread.

0 Likes

#5

@texnixe, I am using 7.2.10, using the latest MAMP version, I haven’t done anything special. should I be using a different program? It happens on both (remote and local dev) :frowning:

0 Likes

#6

I’m using Mamp myself and haven’t experienced this yet, but we have the same issue here reported here:

I currently have no idea what might be the issue, but wondering if it is some server setting.

0 Likes

#7

I have the images as background image, would it be the issue? these image are been request/loaded by css.

0 Likes

#8

If you delete the media folder, the correct images is actualized ? The page show the images on the first load ?

0 Likes

#9

Theo, no, still same behavior:confused:
I deleted the media folder, and I re-upload the images, but the first load still the same behavior. I am not sure what it is causing it.

0 Likes

#10

Are your images very big?

0 Likes

#11

Also have you set a new thumb driver like Image Magik? I think GD is the default. Maybe its out of date or something. Is your server up to date in general, besides PHP?

0 Likes

#12

I’m asking you the question, because as @jimbobrjames pointed out, I see similarity to my problem.

I myself have to load each page to build correctly media cache to be visible and in your case updated. As if there was a bug on the generation on the fly with a delay for the first load, remains to know what causes this problem.

I don’t have the technics level for this problem, but i would like know if it’s caused by Nginx , the GD library, php config or other.

0 Likes

#13

As far as I understand, @gplopes uses Mamp with the default Apache server? And you, @Theo, only experience this issue on your Raspberry, but not on your VPS, both running Nginx, right? Have you tested running your Raspberry with Apache yet?

@Theo, @gplopes
When exactly are the images generated, before you actually reload the page or really only on the second load?

What about memory settings? Cache settings?

Somehow it does indeed seem as if generating the images was too slow for some reason. But I can hardly imagine this happening with a single file only in a Mamp environment with standard Mamp settings, unless the images are really huge.

However, the whole purpose of generating thumbs asynchronously in Kirby 3 is to circumvent those memory issues that can happen when generating thumbs for many images or generating many image sizes.

0 Likes

StarterKit : images display only after reload page in the browser
#14

Thanks @texnixe

To not pollute this thread, I replied on my thread :

0 Likes

#15

I might have found the cause of my issue.

I had my own plugin which was loading a bunch of snippets and blueprints, once I removed and added them to Kirby default folder site/snippets and site/blueprint my issue seems to have despaired, so far.

0 Likes