I have added an image size using this:
add_image_size('property-featured', 484, 393, true);
It’s worked very well for the past year and has generated about 1GB of images in that size, but this image size is no longer needed. I want to clear up the images that have been created over the year in this size.
So far I have removed that line of code but it doesn’t clean up the created images.
What is the correct way to remove those images?
I found a plugin that does this for me: Additional image sizes (zui)
Update
While the plugin worked wonders and did a lot of cleanup it couldnt cleanup the files left behind by images that had been removed from WordPress in the past. I used this home brew script to clean up some of the left over images:
I use http://wordpress.org/extend/plugins/regenerate-thumbnails/ to recreate my thumbnails, as far as I am aware it removes all image sizes then regenerates them. It could be a slow one depending on how many images + image sizes are reigstered.
Another way would be to do this via SSH and find them with a command like:
Then run a command like:
Please make sure you back up everything before running such a command.