Unused Preview Images Created
doughnut - May 5, 2007 - 09:02
After a recent upgrade of the image module, my site ballooned in size. Going from around 80MB to 250MB and now 400MB.
Storage isn't an issue, but what's annoying is that drupal now seems to be constantly creating image "previews". My settings haven't changed at all recently and I can deal with a "preview" image being generated now (previously one wasn't), but I don't like is having some 12-22 preview images for each photo I've uploaded.
Is there some easy way to clean out all the unused preview images and stop drupal from recreating them?

Are you using image module?
Are you using image.module? I have had something similar with that recently whereby lots of previews were getting produced (I think I had something like 600 of one!).
To stop them you can try regenerating the derivatives from the Administer > Content management > Content page, selecting the image nodes that are having trouble, and then choosing Rebuild image thumbnails from the update menu.
To get rid of the surplus files you might want to look at the audit files module that I wrote to clean up from the problem. This will run a report on your site and show you a list of files that are on your server but don't appear in your database table. You can then choose to delete them from the report to save messing with FTP.
If the problem is related to image.module you might want to post a bug report at the image project so it can be investigated. I've had a few images still produce stray previews so am keeping my on it to see what is happening...
________
Just five more minutes...
www.stuartandnicola.com
Thanks for the reply! I'll
Thanks for the reply! I'll be trying out your module as soon as I get the chance.
Okay, the audit module
Okay, the audit module worked well.
But new preview images are being duplicated every day. Have I missed some setting with image.module or is it simply time to submit a bug report?
Did you regenerate thumbnails?
Regenerating thumbnails worked for me - I worked out what nodes were being affected by using the file name, regenerated the derivatives for those nodes, and the problem went away.
I would raise this as a bug on image module - you might want to post against this bug as it would seem to be related. Good luck - my site seems to be behaving since I regenerated.
Glad the audit module worked for you - much easier than hunting files down manually :-)
________
Just five more minutes...
www.stuartandnicola.com
After regenerating all
After regenerating all thumbnails, I thought the problem had been solved.
But, unfortunately, here they are again... Those "preview" copies are starting to be generated again!
Definitely time for a bug report.
Upgrading fixed it for me
I had the same problem--38,000 images! Had to delete the whole folder and rebuild. In any case, I'd been running image-5.x-1.1, and after upgrading to image-5.x-1.4 I've had no more spurious previews.