I was taking a backup of my wp-content folder. But when I noticed size of uploads folder. I was astonished and each image used in my blog had 5 copies with different sizes in that folder. All these totaled to 7GB in 2 months. This way it won’t take long to fill a server storage. I have a lot of image gallery posts. I didn’t knew this that each image in wordpress is resized and kept in different sizes and thought only featured images went through resizing.
So, is there a way that wordpress only resizes featured images?
You can simply set all unused image size attributes to
0
to stop WordPress generating them. Whilst this only applies for default image sizes, you can use filters to remove them.In general, WP stores all those sizes to generate images for in the
global $_wp_additional_image_sizes
. The following plugin uses a filter to remove sizes on the fly. See the debugging points to unset/export/etc. the different sizes. You’ll quickly get an overview and be able to remove what you don’t need.And to add custom sizes to your Size selector in the admin UI, simply use the following: