How to delete & disable generating unused thumbnails in WordPress

Deleting unused thumbnails and stopping WordPress from generating them can save you a lot of hosting space. Imagine you upload a 50 KB image to WordPress and it creates about 10 thumbnails in different sizes, some of them even larger than the original. On average, a 50 KB image can end up taking up to 500 KB of your hosting. With 1,000 images, that’s about 488 MB. Let’s see how to delete unused thumbnails and turn off automatic thumbnail generation in WordPress to free up that space.

Delete unused thumbnails in WordPress

Go to Plugins > Add New on your WordPress website. Find and install the Regenerate Thumbnails Advanced plugin. It cleans up all the unused thumbnails on your WordPress site and also regenerates thumbnails for images used as post thumbnails (Featured images).

Install a plugin to remove unused thumbnails in WordPress
Install a plugin to remove unused thumbnails in WordPress

Remove all unused thumbnails in WordPress

Go to Tools and you’ll see Regenerate Thumbnails. Click it and follow these instructions to delete the extra thumbnails in WordPress.

  • Right side: Click Advanced options and check Delete Unselected Thumbnails.
  • Left side: Uncheck everything so you can delete all thumbnails of images that aren’t used as featured images. Don’t worry, we’ll regenerate the thumbnails for featured images in the next step.

Further down, if you use JPEG images, set the quality to 100. If you mostly use PNG, you can ignore this setting. Then click SAVE SETTINGS and click the REGENERATE button.

Settings to delete unused thumbnails in WordPress
Settings to delete unused thumbnails in WordPress

It takes about 5 minutes to finish. I find this plugin works quite fast. Now that all the thumbnails are deleted, let’s regenerate thumbnails for the images used as featured images.

To regenerate thumbnails for your featured images, change the settings as follows.

  • Left side: Check Regenerate only Featured images and uncheck all the options below it.
  • Right side: Only check the sizes your website uses for featured images. If you don’t know which sizes your website uses, see the instructions after the image below.

Once you’re done, click SAVE SETTINGS and then click the REGENERATE button.

Settings to regenerate thumbnails for featured images
Settings to regenerate thumbnails for featured images

To see which thumbnail sizes your website uses, right-click a post’s featured image and select Inspect (this works in Chrome and Coc Coc, and other browsers like Firefox are similar). Find the <img> element and look at the size at the end of the image URL. For example, in the image below, the image URL ends with “350×250”, so you would select the 350×250 size in Regenerate Thumbnails.

How to check which thumbnail size a WordPress website uses
How to check which thumbnail size a WordPress website uses

If your website has a sidebar widget that shows post thumbnails, check which size it uses too and select it in Regenerate Thumbnails.

Disable generating unused thumbnails in WordPress

We’ve just cleaned up the thumbnails that aren’t currently in use. But what about future uploads? There are 2 ways to stop WordPress from generating extra image sizes.

Disable the default WordPress image sizes

By default, WordPress automatically creates 4 extra image sizes: Thumbnail, Medium, Medium_Large and Large. In practice, we rarely use these sizes.

Go to Settings > Media. Change all the sizes to 0 and click Save Changes. From now on, WordPress won’t create these extra images when you upload new ones.

Disable the default WordPress image sizes
Disable the default WordPress image sizes

However, this only disables the default WordPress sizes. Your theme is what actually uses thumbnails to display posts, and WordPress themes generate many other image sizes. Follow the instructions below to turn those off as well.

Turn off extra image sizes created by your theme and plugins

Go to Plugins > Add New on your website, then find and install the Stop Generating Unnecessary Thumbnails plugin. It lets you disable automatic thumbnail generation across your whole website (both WordPress default sizes and theme sizes).

Install a plugin to stop WordPress from creating extra image sizes on upload
Install a plugin to stop WordPress from creating extra image sizes on upload

After installing the plugin, you’ll see Image Sizes in your admin menu. Click it and use it like this, it’s pretty simple.

  • Checked: That size is turned off, so no image of that size is created when you upload a new image.
  • Unchecked: That size is generated automatically when you upload a new image to WordPress.

Here’s a little trick to use it effectively. Before you upload regular images (images not used as featured images), check All and click the Save Settings button below.

Settings to turn off all extra image sizes in WordPress
Settings to turn off all extra image sizes in WordPress

Before you upload an image to use as a Featured image, go to Image Sizes, uncheck the sizes your website uses for thumbnails, then click Save Settings. This lets WordPress create the thumbnail sizes this image actually needs.

Settings that allow thumbnails for an image you will upload as a featured image
Settings that allow thumbnails for an image you will upload as a featured image

Conclusion

Also note that you shouldn’t remove thumbnails for images used as featured images. Without them, pages that show small post thumbnails will load the original image file instead, which is many times larger, and your website will be slower. So it’s worth putting in a bit of extra effort and following the steps above carefully. Good luck!

Hieu Tran Ngoc Minh

Hieu (born in 1996) holds a Bachelor's degree in Business Administration from Saigon Technology University. Currently a Data Analyst at Ninja Van, Hieu has extensive experience in Data Analysis and Digital Marketing. This blog is where Hieu shares practical experiences from work and life.

1 Comments

  1. Regenerate Thumbnails Advanced xóa lâu, mà lỡ pause rồi tạm dừng để qua hôm sau xóa tiếp thì nó lại chạy từ đầu, lâu vl

    Reply

Leave a Comment

Feel free to leave your comment (preferably in English), and we will review and respond as soon as possible. Please use a real email to ensure your comment is approved and to receive notifications when we reply. You can also add an avatar to your email.