Another common case is when your (parent) theme, or a plugin creates image sizes that you will never use.
Deregistering unwanted sizes will prevent WordPress from generating and storing images you won’t use.
This will save disk space, and associated costs.
Of course, it only affects future image uploads.
Plugins that “regenerate thumbnails” can be used to delete existing thumbnails that are not currently registered, while creating any missing sizes.
—
The article mentions that you cannot use this function on reserved image size names.
However there are a few work arounds:
In the WordPress Settings, you can set the image size to 0px.
You can try the `intermediate_image_sizes_advanced` function.
You can put the following code in your functions.php file:
To remove all the image sizes keeping only the default WordPress image sizes –
Another common case is when your (parent) theme, or a plugin creates image sizes that you will never use.
Deregistering unwanted sizes will prevent WordPress from generating and storing images you won’t use.
This will save disk space, and associated costs.
Of course, it only affects future image uploads.
Plugins that “regenerate thumbnails” can be used to delete existing thumbnails that are not currently registered, while creating any missing sizes.
—
The article mentions that you cannot use this function on reserved image size names.
However there are a few work arounds:
Example
In a theme’s functions.php file:
You could combine this with the add_image_size function in your theme.
To replace any of the default image sizes like ‘medium’, ‘large’, etc you must remove first and then add with new attributes.