Archived topic
Reduce the number of image sizes that your WordPress has registered
5 replies · Started by Deyson on August 11, 2022
Hello and good day.
Recently, my host just made me aware that my installation has registered up to 17 image sizes.
So my question is how do I find out what image sizes are being actively used ( I do not want to delete the images my website needs)
, de-register the unwanted image sizes, and then the best way to delete the unused images.
Please let me know what you think. 🤔
Thank you and have an Amazing Day! 🙂
Hi there,
tricky - i don't think theres an easy way to tell which attachment sizes are not required.
You would need to first find out what sizes are being registered and then investigate each plugin / function that has registered them to find out where they may be used.
I found this article which covers how to list the attachment sizes and how to unregister them:
https://codexin.com/remove-unused-wordpress-image-sizes/
I also found this reply to a similar topic where the user provides some plugins:
https://wordpress.org/support/topic/remove-thumbnail-size-not-used/#post-14306830
I would recommend making a backup or doing this on a staging site just to be safe
Awesome! Thank you @David! 🙂
Also, is there a way to know which images are needed by GeneratePress's Niche.
Thank you and have a Fantastic Day! 🙂
Out of the box, Niche uses very few sizes.
I don't recall adding any non Woocommerce images, so the sizes here:
https://woocommerce.com/document/image-sizes-theme-developers/#section-4
are probably the only ones that are used.
Awesome! That would save a lot of time.
Thank you and have a Fantastic Day! 🙂
You're welcome