hi
when i try to replace an existing image with an edited one, the files in the _resampled folder dont change... is there a way around this? like automatically delete all resampled images?
thanks
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
hi
when i try to replace an existing image with an edited one, the files in the _resampled folder dont change... is there a way around this? like automatically delete all resampled images?
thanks
Nope. SS doesn't work that way. It keeps all resampled images even after the file has been deleted.
It would seem that we need a dev/refresh_resampled. There are lots of times that I would like to remove all the resampled images and let the system remake them. For example if you are using DOM for a gallery and you upload an image to replace one that is already there the image gets replaced the the thumbnails that are used by the system are not because it searches and finds that they are already in the _resampled folder and the system doesn't know that the image changed so it doesn't make new ones. This is ok for me since I can just go in with FTP and delete them but for a client who is trying to manage their own gallery content this is very frustrating.
I will probably write a custom controller using PHP's built in filesystem tools to do a search and destroy of those files. When I get it working I can post it here.
If someone already has written this or there is some undocumented functionality already built into SS please let us know.
There's an /images/flush command. Look it up in the docs.