Facebook-f X-twitter
EncodeByte
Need Help!
  • How-To
    How-ToShow More
    How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect
    By
    Franchbabu
    How to Fix the “Windows Cannot Be Installed to This Disk” Error
    By
    EncodeMore
    How to Check Your Laptop’s Battery Health: A Step-by-Step Guide
    By
    EncodeMore
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    How to Activate Windows Legally and For Free (100% Working)
    By
    EncodeMore
  • Web Development & Coding
    Web Development & CodingShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    🚀 10 Reasons Why Hostinger Is the Best Web Hosting Platform for Speed, Security & Affordability
    By
    Franchbabu
    How to Add “Made with ❤️” to Your WordPress Footer (No Plugin Needed)
    By
    EncodeMore
    WordPress Redirect After Login: How to Set It Up
    By
    EncodeMore
  • Code Snippets & Scripts
    Code Snippets & ScriptsShow More
    How to Hide a Class in WordPress (Easy CSS & Admin Tips)
    By
    EncodeMore
  • Website Design & UX
    Website Design & UXShow More
    10 Web Design Mistakes That Are Killing Your User Experience (and How to Fix Them)
    By
    Franchbabu
  • Make Money Online
    Make Money OnlineShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    Website related skillsets that you shoud have
    By
    EncodeMore
    Top Sites Like Fiverr: The Best Fiverr Alternatives for Freelancers
    By
    Franchbabu
    Best Telegram Channels For Free Paid Courses
    By
    Franchbabu
  • 🤩 Trending:
  • How-To Guides
  • WordPress & Website Development
  • Web Development & Coding
  • Windows & Software Fixes
  • Tech Tips, Tools & Tutorials
  • Computer Tips & Tricks
Font ResizerAa
EncodeByteEncodeByte
Search
  • How-To
  • Web Development & Coding
  • Code Snippets & Scripts
  • Website Design & UX
  • Make Money Online
Follow US
Made by ThemeRuby using the Foxiz theme. Powered by WordPress
WordPress & Website DevelopmentHow-To Guides

The Best Way to prevent WordPress from generating different image Sizes

Last updated: June 12, 2023 2:03 am
By
Franchbabu
Share

Do you want to prevent WordPress from creating additional image sizes?

Contents
Table of ContentsWhy is it necessary to prevent WordPress from generating image sizes?Disable WordPress from generating different image sizes #1 Manually via WP-Admin#2 How to Prevent WordPress from Creating Image Sizes via PluginHow can I get a list of all registered WordPress Image Sizes?#3 Using Some Simple Code Remove all default image sizes

When you upload an image to WordPress, it automatically generates numerous copies in various sizes. Different themes and plugins can boost the number of sizes generated even further. If you have a lot of photographs on your website, this may raise your storage requirements and the size of your website backup file.

In this article, we’ll teach you how to prevent WordPress from creating picture sizes.]

Table of Contents

  • Why is it necessary to prevent WordPress from generating image sizes?
  • Disable WordPress from generating different image sizes 
    • #1 Manually via WP-Admin
    • #2 How to Prevent WordPress from Creating Image Sizes via Plugin
  • How can I get a list of all registered WordPress Image Sizes?
    • #3 Using Some Simple Code Remove all default image sizes

Why is it necessary to prevent WordPress from generating image sizes?

When you upload an image to your WordPress website, multiple copies of the picture in various sizes are automatically generated. In addition to the original image, thumbnail, medium, and large sizes are generated by default.

Additional image sizes can also be generated by themes and plugins. You may discover that you have five or 10 copies of each image in various sizes.

During the upload process, the additional image sizes are generated and saved. This has no effect on your visitors or slows down your website, but it does necessitate a little more storage space.

The extra space taken up by these additional photographs is usually not a problem. Most WordPress hosting providers provide ample disk space, which is sufficient to store thousands of photographs.

Having said that, some users may choose to restrict WordPress from creating picture sizes.

For example, when customers backup their website with hundreds of photographs, they may discover that their backup has grown very huge and is taking longer to complete. Other users discover that they never use certain image sizes, and deactivating them saves storage space.

    However, be cautious when removing image sizes. They may be required by your theme for post thumbnails, sliders, attachments, or special post kinds. Remove them only if you are certain and aware of the impact on your site.

    That being said, let’s look at how to prevent WordPress from creating picture sizes.

    Disable WordPress from generating different image sizes 

    #1 Manually via WP-Admin

    This is the simplest method for removing WordPress’s default image sizes. You can disable the picture sizes you don’t require from your site with a few mouse clicks.

    To prevent WordPress from creating different picture sizes after uploading, use the following steps:

    • Log in to WordPress as the Administrator. In the left sidebar of the Dashboard,
    • navigate to Settings > Media

      In the Media Settings, set the width and height to ZERO for the following sizes:

      • Thumbnail Size
      • Medium Size
      • Large Size

      #2 How to Prevent WordPress from Creating Image Sizes via Plugin

      The first step is to install and activate the Stop Generating Unnecessary Thumbnails plugin.

      After activation, go to the Media » Image Sizes page to disable image sizes.

      Once there, you’ll notice that all extra image sizes are shown on the left side of the screen. The ones in red indicate that these sizes are enabled and will be generated.

      prevent WordPress from generating image Sizes

      You must drag any size you do not want to the right column. This will disable it and prevent it from being generated when you upload an image.

      After dragging each image size to the right, it will be highlighted in green. A notification will appear at the top of the screen stating that ‘0 Thumbnails will be created’.

      prevent WordPress from generating image Sizes

      Make sure to click the ‘Save Settings’ button to activate your updated settings. When you upload a picture to your WordPress blog, no extra image sizes are created.

      However, you will retain all of the additional sizes of any photographs you have previously submitted. Let’s look at how to delete unneeded image sizes in WordPress.

      Simply click the ‘Regenerate’ tab, and then the ‘Regenerate’ button.

      prevent WordPress from generating image Sizes

      All extra photographs will now be removed from your media collection. To minimize overloading your server, this will be done in batches of 50.


      How can I get a list of all registered WordPress Image Sizes?

      To receive a list of all registered image sizes, add the following code to the functions.php file for your theme or any plugin-specific file.

      // get a list of all registered WordPress Images Sizes
      $image_sizes = get_intermediate_image_sizes();
      echo '<pre>';
      print_r($image_sizes);
      echo '</pre>';
      

      Remove this code as soon as you know which registered picture sizes are available.

      #3 Using Some Simple Code Remove all default image sizes

      To eliminate all WordPress default image sizes by coding, first install and activate the Code Snippets plugin. Then, navigate to Settings.

      Click the Add New button, you’ll be sent to an editor where you can enter custom codes.

      To begin, give your snippet a name. Then, copy and paste the code from below into the editor.

      function add_image_insert_override( $sizes ){
          unset( $sizes[ 'thumbnail' ]);
          unset( $sizes[ 'medium' ]);
          unset( $sizes[ 'medium_large' ] );
          unset( $sizes[ 'large' ]);
          unset( $sizes[ 'full' ] );
          return $sizes;
      }
      add_filter( 'intermediate_image_sizes_advanced', 'add_image_insert_override' );

      Then, click Save and Activate.

      Congratulations, you have deleted all additional image sizes from your site and prevented WordPress from producing them in the future.

      We hope this tutorial helped you learn how to prevent WordPress from generating image sizes. You may also want to learn How to Clone WordPress Website via Softaculous? or check out our list of the best WordPress Tips & Tricks. Do you still require assistance? Please leave a comment below.

      Share This Article
      Facebook Whatsapp Whatsapp LinkedIn
      Leave a Comment

      Leave a Reply Cancel reply

      Your email address will not be published. Required fields are marked *

      Popular Categories

      Themes & Customization

      1 Article

      Troubleshooting & Fixes

      1 Article

      WordPress Tips & Tricks

      6 Articles

      WordPress Tutorials

      5 Articles

      Must Read

      WordPress & Website DevelopmentHow-To Guides

      How to Create a Private/Password Protected Post or Page in WordPress

      How-To GuidesSEO Tips & StrategiesWordPress Tutorials

      How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect

      Computer Tips & TricksHow-To Guides

      How to Repair a Bad Hard Disk (Hard Disk Low Level Format)

      How-To GuidesTech Tips, Tools & Tutorials

      How to Remove URLs From Google Search

      • I need help with …

      Starting a Blog

      WordPress SEO

      WordPress Performance

      WordPress Errors

      WordPress Security

      Got A Question?

      Need Expert Help?
      Let CodeXcool power up your website with
      custom WordPress design, speed optimization, and SEO!
      🚀 Get Started

      You Might also Like

      How To Schedule An Email In Gmail To Send Later

      Web Development & CodingWordPress & Website Development

      How to Find Low Domain Authority Websites to Rank Fast on Google

      How-To GuidesMake Money Online (MMO)

      The Ultimate Affiliate Marketing Guide for Beginners – Step by Step

      How to Create Youtube Channel in 2023
      How-To GuidesTech Tips, Tools & Tutorials

      How to Create a YouTube Channel in 2023

      EncodeByte

      © 2025 EncodeByte – Discover expert tech tutorials, coding guides, troubleshooting solutions, and free tools. Simplify technology, build smarter, and learn faster with us.

      About Us / Privacy Policy / Contact Us

      Latest News

      • Coming Soon
      • Coming Soon
      • Coming Soon
      • Coming Soon

      Services

      • Coming Soon
      • Coming Soon
      • Coming Soon
      • Coming Soon

      Looking for custom web development or maintenance?

      Check out our parent team at [CodeXcool.com] 🚀
      — Let's build together!
      Request a Quote
      Welcome Back!

      Sign in to your account

      Username or Email Address
      Password

      Lost your password?