Function to create images

On page load, grav creates the image cache, but with alot of media per page, this takes quite long. So I’d like to write a function that creates all cache images at once. Does this exist already? Look for the PreCache plugin.

Thanks, I tried this plugin, but I don’t notice any difference. I still get the impression that all images need to be recreated after the cache is cleared.

What the precache plugin does is when you hit any page on your site for the first time, it kicks off an out of process task that loops over each of the pages and calls their content() method. This in turn automatically generates the images for you in the background.

I actually did add a new command line utility that will let you run this from the CLI. This will be available in the next release of the precache plugin.

Wow great feature, thanks, just what we need.