WordPress Tutorials

How to Prevent WordPress from Generating Image Sizes

WordPress has many default settings that create the base for your shiny and new website or blog. Though some of these settings are fine to be left alone, there are others that some may prefer to have changed.

One such default action that WordPress will take from the get-go is generating various image sizes for the pictures that you upload to your media file.

If this is something that you would like to prevent on your WordPress blog, then keep reading.

Why You May Want To Do This

Is there any particular reason that you may want WordPress to skip from generating these image sizes? Yes, in fact, there are a couple reasons why you might want to do this.

  1. It’s Often Redundant. When uploading an image to your Media file, there is a large chance that you’re only going to use it once and you are only going to use one size of it. However, if you keep the Media Settings as-is, then WordPress will actually create multiple versions of your image. Therefore, you will be left with extra images that are stored on your server that you neither need nor plan to use.
  2. Backups Can Get Time-Consuming. Creating a backup of your site is something that every website owner should do and do often. However, with your Media Settings left untouched over time the more pictures your add, the higher your number of unused images on your server become. As a result, creating backups of all the files on your server (which include these unused images) will start to take longer and even hours (!) depending on how many images it needs to save.

Fixing The Issue In The WordPress Dashboard

prevent wordpress generate image sizes

There are two main areas WordPress will use in order to generate these new images:

(1) through your WordPress install and possibly, (2) through your designated WordPress theme.

To cut out a large chunk of these images, you can tweak the setting in the back-end of your site.

How To Stop Generating Image Sizes

  1. Login To Your WP Dashboard.
  2. Go to Settings and then, Media.
  3. Here you will find 3 various image sizes: thumbnail, medium, large. Decide which image sizes you won’t be using and then set those sizes to 0.
  4. Update and save your new settings.

From here on out, WordPress will no longer generate additional images in the sizes you set to zero.

The other area that you may want to check is your theme, as many WordPress themes have their own set of image sizes that it will generate.

You can do this by using an FTP client like FileZilla and scanning through the directory marked /wp-content/uploads/ to see if this is the case.

However, if you don’t know how to use an FTP client, then you can look for the following source code in your functions.php file to see if your theme is kicking out additional pictures that you don’t need.

  1. Go to your WP Dashboard.
  2. Navigate to Appearance and then, Editor.
  3. Find your theme’s function.php file and click on it (find it on the right-hand side).
  4. Search for the following code: add_image_size and/or set_post_thumbnail_size. If the PHP file contains that code it will appear there and that means that your theme is generating images. If no image_size source code is shown, then you’re in luck.

If you find that your PHP file has the above mention code, then you need to delete the code(s) and update your files in order to cut those out.

Just know that doing this will remove the ability to generate the images sizes that you may want to keep and prevent you from creating nice galleries, so don’t act too hastily. If you’re not sure if these are images sizes you want to get rid of, then you should probably skip this step and just stick with them until you’ve decided the route you want to take.

There is a reason why we always recommend our users to use premium WordPress themes and plugins. All the themes on MyThemeShop are well designed and developed under a quality control extensive environment to help you set up an exclusive website for your readers.

Do share in comments if you have any other strategy.

Download 3 WordPress themes & plugins​ with lifetime access for FREE!