In this section, we’re going to show you two great plugins for this task: The third method to delete thumbnails in WordPress is by using plugins. This is an excellent and effective method to reduce the number of thumbnails that your site creates. Since you set 0 as the height and width, WordPress won’t save multiple copies of the images you upload. If you are not planning to use any thumbnails, you can simply turn this feature off.Īll you need to do is, enter 0 as the value in all the fields and save the changes. If you have many images, this can take up a lot of disk space. When you upload an image to your media library, your server will automatically create thumbnails of that original image in these sizes. You will see three custom image sizes:īy default, WordPress specifies some values for each image size. To do this, log in to your site and go to Settings > Media. If you’re not comfortable editing your theme’s and plugins’ core files, you can also delete thumbnails from the WordPress admin panel. Remove thumbnails from the WP-Admin Panel
Then select the functions.php file and repeat the process. To do that, go to Plugins > Editor and select the plugin you want to edit. If you also have plugins that create thumbnails, you can do the same and disable them. This way, you will avoid your theme creating the thumbnails that you have disabled in the functions.php file.
However, to disable multiple thumbnails, it’s better to use the multi-line comment /* */.Īnd once you are happy with the changes, update the file. This can be useful if you want to disable specific lines of code. For example, you can disable all of them as follows:Īnother option is to comment on the lines of codes you want to disable by adding // at the beginning of the code. To do that, you need to add /* at the beginning and */ at the end of the thumbnails you want to disable. For each thumbnail that it creates, it specifies the size.Īll you need to do is deactivate the thumbnails you don’t want to generate. If you have a closer look at the code, you will see the custom image size register codes. Then, you will see the functions.php file in the text editor. Then, choose the functions.php file under the Theme Files on the right. The first thing you need to do is go to your WordPress admin dashboard > Appearance > Theme Editor. NOTE: As you are going to make some modifications to the theme’s core files, we recommend you use a child theme and backup your WordPress site to keep your data safe. Even though you won’t do any difficult coding, we recommend this method for those who have some experience making changes to the theme’s core files. A simple way to avoid creating unnecessary thumbnails is by editing the theme’s functions.php file. If your theme registers custom image sizes, WordPress will generate thumbnails according to the theme’s specific dimensions. Delete Thumbnails Manually (functions.php file) In this guide, we’ll show you 3 different methods to delete old thumbnails in WordPress:Īll of these methods are very effective and easy to apply so you can choose the one that best suits your skills. Keep your site running smoothly without affecting user experience.In summary, if you want to keep the thumbnail count low, you can delete all the images not in use from the media library. That’s why it’s important to manage your images smartly and delete old thumbnails from your WordPress site.
So, all those extra images can not only affect user experience but also cost you more money if you have to upgrade your plan. For example, Bluehost has a limit of 50,000 files per account.
On top of that, most hosting companies limit the file count per cPanel account. As a result, the Media Library can store many fields and take up a lot of space in your server, which can also slow down your site. Additionally, some themes and plugins also require different image sizes.
That’s why in this guide, we’ll show you how to delete thumbnails in WordPress and clean up your media library Why Delete Old Thumbnails in WordPress?īefore you learn different methods to remove thumbnails, let’s better understand why you should do it.Įvery time you upload an image to the media library, WordPress generates several thumbnails to display the image in places like featured posts, sliders, and so on. This means you can quickly end up having a huge media library that may slow down your site. The problem is that when you update a new image, WordPress creates several thumbnails. They help us attract users and improve the appearance of the website. Images are very important for any kind of site.