Forum

Thread tagged as: Question, Configuration, Shop

Large-scale asset replacement

Hi,

Soon I am going to be replacing all of the product photos for a Perch Shop (the range is getting professionally photographed). The product images that are being replaced are not used elsewhere on the site. Ideally I would like these to be removed from the server when they are replaced in Perch, otherwise we will end up using a lot of storage space to keep them.

Is there a way of adjusting the buffer for asset clearance so these old images are removed when they are replaced? Currently I am looking at deleting them manually but there are a few thousand so i would rather not have to!

Or is there a way of doing a forced removal of unused assets?

Thanks

Mike

Mike Harrison

Mike Harrison 37 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah ok, so:

define('PERCH_UNDO_BUFFER', 1);

should do what I want, as long as I set it before the update. Thanks!

Drew McLellan

Drew McLellan 2638 points
Perch Support

You'll still get one level of undo, but yes.

Can I set it to 0 ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can, yes. That said, I'm now not convinced that Shop will delete any unused assets. It may only happen with regions and collections.

Hmm ok well I will set it to zero and give it a test drive to see. Thanks for your help