DEV Community

Cover image for How to Remove WordPress Default Image Sizes: Step-by-Step Guide
Meghna Meghwani for ServerAvatar

Posted on • Originally published at serveravatar.com

How to Remove WordPress Default Image Sizes: Step-by-Step Guide

If you’ve uploaded images to WordPress, you’ve probably noticed your wp-content/uploads folder filling up with multiple copies of the same image. That’s because WordPress Default Image Sizes automatically generate several resized versions of every uploaded image, even if your website never uses them. Over time, these extra files can consume valuable server storage, clutter your media library, and make backups larger than necessary.

Over time, these extra files waste storage, increase upload processing, and add unnecessary server load. While WordPress lets you change image dimensions, it doesn’t provide a built-in option to disable image size generation completely.

In this guide, you’ll learn how to stop WordPress from creating unused image sizes using a plugin or code, and how to clean up the extra images already stored in your media library.

TL;DR

  • WordPress creates thumbnail, medium, and large versions of every image you upload by default
  • These extra files consume server storage and increase upload processing time
  • You can stop this behavior using a plugin or by adding a filter to your theme’s functions.php file
  • Existing images need a separate cleanup step to remove previously generated sizes
  • Choose the method that matches your comfort level with code

What WordPress Does Behind Every Image Upload

Uploading an image to the WordPress Media Library does more than simply save the original file. During every upload, WordPress automatically creates multiple resized versions of that image for use across different areas of your website.

By default, WordPress generates:

  • Thumbnail: 150 × 150 px (cropped square), commonly used for galleries and widgets.
  • Medium: Maximum 300 px on the longest side.
  • Large: Maximum 1024 px on the longest side.
  • Full Size: The original uploaded image (unchanged).

Image_Size_Table

Custom Image Sizes

The default sizes are only part of the story. Many themes and plugins register their own image dimensions, including:

  • Page builders
  • Gallery plugins
  • Slider plugins
  • WooCommerce
  • Custom WordPress themes

As a result, uploading one image can generate 5–10+ files depending on your site’s configuration.

Why It Becomes a Problem

If your website stores hundreds or thousands of images, these additional copies consume a significant amount of server resources.

Common drawbacks include:

  • Increased disk usage
  • Slower image uploads
  • Longer backup times
  • Higher storage costs
  • Extra CPU usage during image processing
  • Larger media libraries to maintain

Example

  • 500 original images × 2 MB each = 1 GB
  • If WordPress creates five additional sizes per image, total storage can easily exceed 5 GB, even when many of those files are never used.

image_table

If your theme never displays certain image sizes, generating them simply wastes storage and processing power.

Two Ways to Control WordPress Image Size Generation

You have two solid paths to stop WordPress from generating image sizes you don’t need.

  • The plugin route is the most approachable, it gives you a settings interface and doesn’t require touching any code.
  • The code route is more precise and doesn’t add another plugin to your site, but it does mean working with your theme’s functions.php file.

Neither approach is wrong. Pick based on what you’re comfortable with.

Read Full Article: https://serveravatar.com/remove-wordpress-default-image-sizes

Top comments (2)

Collapse
 
bhavin-allinonetools profile image
Bhavin Sheth

Good breakdown! I’ve seen unused image sizes quietly eat up storage on WordPress sites. Definitely worth checking what the theme actually uses before disabling them.

Collapse
 
meghna_meghwani_ profile image
Meghna Meghwani ServerAvatar

Thank You!
That's a great point. Disabling image sizes without checking what your theme or plugins rely on can lead to missing or improperly sized images. Auditing the sizes in use first is definitely the safest approach.