grav
grav copied to clipboard
Request: Stop Grav updates from wiping out 'images' folder
I have multiple image gallery pages on my site, some with well over 100 images, with thumbnails generated using cropZoom
. Every time I update Grav, it wipes out the images
folder where the thumbnails are, and next time I load those pages it takes a very long time for all those thumbnails to be regenerated.
I'd like to see an option to set Grav so that it doesn't clear the images
folder unless I explicitly tell it to. Perhaps be able to specify a permanent folder for the thumbnails to be stored in?
something like this?
https://github.com/getgrav/grav/blob/b3af6c992011734b5f8ddd6480de595c0d0a3e74/system/config/system.yaml#L99
I've gone and made sure this is set to false
, I'll report back next time there's a Grav update.
@rhukster, setting system.cache.clear_images_by_default
is being used in Grav/Common/Cache::clearCache()
, but only when clearCache()
is being called with parameter $remove
having value default
.
Command $ bin/grav cache
works as expected when setting system.cache.clear_images_by_default
to true
or false
.
However, when Grav is being updated, Grav/Installer/Install::finalize()
calls Cache::clearCache('all');
. Hence the images folder is being wiped out no matter the setting for system.cache.clear_images_by_default
So before each update, I will back up the images
folder.
Just updated my site to 1.7.9 through the Admin Panel. The images
folder still seems to have been wiped, resulting in extremely long load times on my gallery pages.
Updates do a full cache clear.
I tend to agree here, I cannot remember the last time when Grav update has changed existing images. Images are a special case of cache -- I would exclude them.
I wonder, due to which changes in Grav do existing folder structures and images in /images become unusable and must therefor be wiped?
- Is there a change in Grav for which the folder structure need to be changed?
- I can't think of a reason a browser can no longer load existing images from /images (unless the folder structure changes)
- A change in image library makes sense in order to (optionally?) re-optimise cached images, but otherwise...
Any news to share on this issue? A user on Discourse is having trouble with 2GB of images...