How To Stop WordPress From Creating New Image Sizes

Reliable Dedicated Servers from Namecheap

How To Stop WordPress From Creating New Image Sizes

WordPress is becoming very popular day by day. WordPress provides very user friendly system which allows beginners to build websites very easily.

Even though WordPress is very user friendly but it does have some problems. One of the biggest problem of using WordPress is managing the files . WordPress creates many files while operating.

Every time you upload a picture to your website , it creates some resized pictures to feed the header, featured image, homepage thumb and recommended stories. Besides that it even creates three resized photos when you upload a picture.

As a result, uploading a single image may generate more resized images. It may sound innocent ,but it will make a huge number of images on your server. Ever wondered how to stop wordpress theme from creating regenerated images in different sizes?

The matter of great sorrow is that these images will become obsolete once you use a different theme. A new theme will require different types of image resolutions which the previously generated images won’t match. This will cause several numbers of unused and unnecessary files on the server.

Even if you generate new images for the site then you will see a huge number of obsoleted images on your server. You can always manually remove the unnecessary image files but that’s a pain which we don’t want to take.

 

Prevent WordPress from Creating Auto Resized Images

Stop WordPress From Auto resizing images in the media option. By default WordPress creates three resize images. They are Thumbnail size, Medium size, Large size. I always stop the WordPress from resizing in these sizes. Most of the times these are not required. Your WordPress theme will automatically resize the images it requires. In order to prevent WordPress from  creating these three sizes images you can follow below steps.

  1. Go to Settings
  2. Then media
  3. You will see three options as Thumbnail size, Medium size, Large size
  4. You need to turn all the values to “zero” like the image belowPrevent WordPress from creating unnecessary image files
  5. Turn all the values like the image above and WordPress will stop resizing the images into these three sizes

How To Stop WordPress From Creating New Image Sizes

All the WordPress themes uses custom image sizes for header, slider, featured images and other blocks. In order to provide the fast loading these images comes very handy. However, if you really want to stop WordPress these types of images to generate then you can do that too.

Important Note: 

Preventing WordPress from creating these images may cause some trouble. It may cause the thumb, slider or other blocks to perform differently. You need to double check before proceeding.

In order to see how much images are being generated by your current WordPress account you need to go the Cpanel first. Then open the file manager and select your site.

Now go to the Wp-Content > Upload folder. Then choose current month’s number. For December it is 12. After that you will be able to see how many sizes of pictures have been resized like the picture below.

Resized images by WordPress

You will see that the theme itself generated four different sizes image of the original image. It can be stopped but the sites thumb may not work properly.

In order to prevent the WordPress theme to generate custom sizes images for itself we need to go to the functions.php file. It can be accessed via the WordPress theme editor or from the cpanel also. We are assuming that you already know that.

After that, search this quoted like : add_image_size function and see if any result occurs. It will look something like below:

add_image_size( ‘featured-blog-large’, 750, 350, true )

how to stop wordpress from creating new image sizes
We can see that the theme itself requires 4 resized images for it’s different header, featured blocks. We can prevent the Theme from creating any. In order to prevent the WordPress to create new image file you need to delete these lines. For example, if we delete these four lines, it will not generate new image sizes.

There are another set_post_thumbnail_size function. Search for it and delete if exists. Note that, doing this may cause new posts to have irregular thumb pictures. If you can’t find these codes in theme function file then you need to check them on other files.

This is how to stop wordpress from creating new image sizes. If you are about to change your WordPress theme in coming days this may be very handy till you made the changes. If you face any types of problem while removing unnecessary image files ; you can always post a comment in the comment section below. Happy blogging !!!

2 Comments

  1. Motivational Quotes December 23, 2015
    • Afsar December 23, 2015

Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close