Plugin Sale! Save 15% on pro plugins with discount code: FALL2020
Web Dev + WordPress + Security

WordPress Plugin: Disable Media Sizes

WordPress Plugin: Disable Media Sizes Whenever you upload an image using the Media Library, WordPress automatically creates a set of alternate-size images. The number and size of these auto-generated images continues to grow each year, as WordPress tries to keep up with increasingly hi-resolution screen sizes. For many WordPress-powered websites, the extra media sizes enable WordPress to serve images responsively and that’s a good thing. But for some WordPress sites, all the extra images simply are not necessary. In some cases downright wasteful. And that’s where this plugin comes in: to prevent WordPress from creating any unwanted images.

Control which image sizes are generated by WordPress.

WordPress generates lots of extra images

Depending on image size, currently WordPress generates seven extra images for each image that is uploaded via the WP Media Library:

  • Disable Thumbnail Size
  • Disable Medium Size
  • Disable Large Size
  • Disable Medium Large (768px)
  • Disable 1536×1536 Size
  • Disable 2048×2048 Size
  • Disable Big/Scaled Size

As thoroughly explained in my previous post on how to disable WordPress automatically generated images, all the extra images can really add up and consume a LOT of precious server resources. This plugin gives you control over which image sizes are generated by WordPress.

Disable unwanted image sizes

So for those of us too busy to implement the code required to disable unwanted images, here is a free and simple plugin that makes it easy to do with a few clicks.

WordPress Plugin: Disable Media Sizes (settings screen)
Note: If all sizes are disabled in the plugin, only the original image will be uploaded. Also: it’s recommended to enable at least one or two smaller sized images. That way WordPress can use them when displaying thumbnails in the Admin Area. Instead of having to load the full-size images for thumbs, etc.

Plugin Features

I try to keep all of my WordPress plugins as lightweight and fast as possible. The Disable Media Sizes plugin utilizes a minimal amount of code, so it is very lightweight and fast. Other features include:

  • Clean, secure code
  • Written according to the WP API
  • Simple, lightweight, and flexible
  • Simple to use: choose image sizes to disable and done
  • Localized and translation ready
  • Cleans up after itself when uninstalled
  • Easy peasy.

For more details about how it works, visit the plugin docs at WordPress.org.

Installation & Usage

First install and activate the plugin:

  1. Upload the plugin to your blog and activate
  2. Then visit the Disable Media Sizes settings
  3. Choose which image sizes to disable and save changes

Done! That’s all you need to stop WordPress from generating any unwanted image sizes.

Important

Please understand that this plugin:

  • Does not affect any existing images
  • Only works while the plugin is active
  • Does not delete any images
  • Only prevents WordPress from generating extra sized images

Learn more about the techniques and code used in this plugin.

Download

Disable Media Sizes is open source and 100% free for everyone. Learn more and download at the WP Plugin Directory.

Jeff Starr
About the Author
Jeff Starr = Web Developer. Book Author. Secretly Important.
Digging Into WordPress: Take your WordPress skills to the next level.

One response to “WordPress Plugin: Disable Media Sizes”

  1. As usual, Thank you Jeff for another great plugin.

Leave a reply

Name and email required. Email kept private. Basic markup allowed. Please wrap any small/single-line code snippets with <code> tags. Wrap any long/multi-line snippets with <pre><code> tags. For more info, check out the Comment Policy and Privacy Policy.

Subscribe to comments on this post

Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
BBQ Pro: The fastest firewall to protect your WordPress.
Thoughts
Air finally clearing here in WA. Feeling grateful to breathe again. #oxygenmatters
Past week here in WA state has been hellish. So much smoke, like living in a chimney.
Now in September, I’m where I wanted to be in March.
Spent some time updating my article on unsafe characters, once again current with latest IETF specification.
Just realized that “Neo” is an anagram for “One”. As in, “he is the One” (The Matrix).
To get VLC app to load all songs (including subfolders), go to Preferences ▸ Show All ▸ Playlist ▸ Subdirectory behavior ▸ Expand.
Switching from PhotoShop to Affinity Photo is one of the most liberating work-related things I've done in 20 years.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.