Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

imagegallery: replace images


Go to End


4 Posts   1639 Views

Avatar
marcink

Community Member, 89 Posts

24 July 2009 at 7:15pm

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

25 July 2009 at 3:32am

Nope. SS doesn't work that way. It keeps all resampled images even after the file has been deleted.

Avatar
micahsheets

Community Member, 165 Posts

17 November 2009 at 7:42am

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

17 November 2009 at 7:57am

There's an /images/flush command. Look it up in the docs.