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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Spring Cleaning SilverStripe


Go to End


2 Posts   572 Views

Avatar
Stef87

Community Member, 66 Posts

28 September 2012 at 9:13pm

Hi

I'm using 2.4.7.

I know this is probably a silly question but I was wondering about something. I have implemented a method that generates images based on info provided. There can be hundreds at a time but they are usually only about 286 bytes. I was wondering whether there iss any way to programmatically spring clean every once in a while since, even though they are small, they will mount up over time. My user will not be able to do this so I was wondering if there was any clever way of doing it for them?

Thanks

Avatar
martimiz

Forum Moderator, 1391 Posts

29 September 2012 at 7:18am

You could of course just remove them using ftp, then resync... But that would also remove images that are still used somewhere, unless you know exactly which images to target.

It's not easy to detect if images are used, as they can be related (has_many, has_one) to different dataobjects and/or hard-coded in the Content, so that would take some clever scripting, taking into account how your site is built...