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.

General Questions /

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

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

Spring Cleaning SilverStripe


Reply


2 Posts   298 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, 1106 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...