Delete not used images
-
I want to delete images that are not used from a web site with 2500 images.
I have read about plugin DNUI (delete not used images) and have reservations about using it
I would like a plug-in that:
. Finds each image that is not used by any post or page in my site, and
. For each unused image, appends a user defined code, like zNotUsed, to the media library image descriptionAfter running the plugin I would search for the images containing zNotUsed, and probably delete them all.
Before running this plugin I would protect some images, e.g. my site logo image. I would do this by creating a new page that clearly used these images.
I am working on a word press site that we generated from a Drupal site. It has about 2000 posts, 50 pages and 2500 images. Probably, many images are unused.
The plugin “find post attachments” does show, for each image, what posts use each image. It helped me delete 400 images – but it took me about 5 hours to do this as the site slowed down lots with the plugin, perhaps because there are so many images. I would prefer not to repeat this very long process.
A plugin like I am suggesting would be good to run periodically on any big web site, particularly one like ours, where content is often provided by volunteers. The plugin could be activated each time it was used and then unactivated or deleted – to keep the site smaller.
At the moment when I delete an old post, I do not delete the images in the post, as I am not sure whether the images are also used by other posts. This means that the number of unused images will tend to grow. I would periodically run a suitable plugin to keep the site free of unused images.
If you know of an good existing plugin that does this, or if you construct such a plugin please let me know.
- The topic ‘Delete not used images’ is closed to new replies.