Automatic Images Folder Cleaning
Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/b569f1278bc51042#
In-Portal stores images in 3 types : online, pending and resized ones.
For many reasons, some pending images are not deleted by In-portal (one of my customers has 8213 pending images using 483Mo), and some online images aren't removed when the product is deleted from catalog.
These non-deleted images lead to bigger folder size, increasing the backup sizes unnecessarily and creating confusion for users, which have images with "_a" at the end of the name, whereas apparently no product has the same image name (because an image from an old product still exists in image folder).
I suggest to write a short script achieving the following functions:
- cleaning pending folder once a day when nobody is editing a product
- comparing images table and images in folder, if an image isn't listed in DB, delete it from folder
This is a small improvement, but this way In-Portal manages really all files and keeps installation in a good state anytime.