WordPress saves every upload at several sizes, and themes and plugins add their own, used or not. Keep the sizes your current design uses, stop the rest, and resize photos before uploading them.

One photo, a dozen files

Upload a photograph to a WordPress site and the media library shows one image. The server is holding several.

WordPress makes resized copies the moment the file arrives. The theme asks for copies of its own, and some plugins ask for more. One photo from a phone can become ten or twelve files in the uploads folder.

Most of those copies are made whether or not any page will ever show them, and nobody deletes them, because nobody sees them.

After a few years of uploads, that is thousands of files doing nothing.

Where the copies come from

The last is the one that grows fastest. A photo straight from a phone is often several megabytes, and WordPress keeps it untouched beside all the smaller versions.

What the sizes are for

The copies are not a mistake. A page that needs a small image should not make a phone download a five-megabyte original just to shrink it.

Since version 4.4, WordPress also lists the available sizes of each image in the page's code, so the browser can pick the smallest one that fills the space.

That is how a phone on a data plan ends up with a lighter file than a desktop screen. Theme sizes, in turn, crop images to the exact shape a slider or blog card expects.

So the useful question is not how to stop WordPress making copies. It is which copies the current site actually uses.

Why the unused ones pile up

Every registered size is made for every upload. A theme that wants a wide header crop gets one made from a product shot, a staff headshot and a scanned price list alike.

Change the theme and the old theme's copies stay on the server, while the new theme's sizes exist only for images uploaded after the change.

Remove a slider or a gallery plugin and its copies stay too. Nothing in WordPress goes back to tidy up.

Every one of those files takes disk space and goes into every backup. Each has to be copied again when the site moves server or is restored after a problem, which is when speed matters most.

A worked example

A family-run paint store that also sells wallpaper and blinds keeps a gallery on its website: finished rooms, house exteriors and colour pairings customers have tried.

Staff add photos from their phones, often a dozen at a time, straight into the media library at full size.

Over four years and two redesigns, the uploads folder grew to fill most of the hosting account, and the nightly backup started running into opening hours.

The developer who looks after the site found every photo stored eleven times: the original, WordPress's four sizes, and copies for the current theme, the previous theme and a slider removed two years earlier.

The current theme's unused sizes were switched off, posts were searched for any that still linked to old copies, and the rest were removed after a full backup. Staff now resize photos to 2,000 pixels wide before uploading.

Nothing on the site looked any different afterwards. The backup finishes overnight again.

Finding which sizes your site makes

The screen under Settings, then Media, shows only three of WordPress's sizes, and nothing about the theme's or the plugins'.

A better check is to look at one recent upload on the server. Its copies sit beside the original with their dimensions in the file name, such as photo-300x200.jpg, so counting them counts the sizes.

A developer can list every registered size in a few minutes and trace which theme or plugin asked for each one.

Then compare that list with the design. Each size should match something a visitor actually sees.

Trimming the sizes

Keep WordPress's own sizes. They are modest, the dashboard uses them, and they let phones download lighter files.

Theme sizes for layouts you do not use can be switched off in a child theme, the small add-on theme that keeps customisations safe from updates. A plugin kept for a feature nobody uses is better removed.

Old copies need more care. When an image is placed in a post, WordPress writes the address of that size into the post itself, so deleting the size breaks the image without warning.

Search the content for each size's dimensions first. Sizes nothing links to can go, and the rest stay until those posts are updated. Then take a full backup and remove the files with a proper tool, not by hand.

Uploading sensibly sized originals

The easiest saving happens before the upload. A phone photo is usually about 4,000 pixels across, and very few layouts show anything wider than 2,000.

Resize each photo to the widest space it will fill, or about 2,000 pixels for a full-width banner, and save it as a JPEG at good quality. A file of several megabytes usually becomes a few hundred kilobytes.

That matters to visitors as well as the server, since a page that inserts an image at full size sends everyone the whole original.

Give the job to whoever uploads most often, with the target width written down. A habit beats a clean-up every two years.

The counter-case

A small site with a few dozen images has a few hundred files at most. Trimming sizes there is tidying, not urgent work.

Online stores need more sizes than most sites, since product grids, zoom views and cart thumbnails all use different crops. Removing one of those breaks the shop, not just a picture.

And a site due for a redesign is better trimmed after the new theme settles, because it will bring sizes of its own.

For everyone else: keep the sizes the design uses, stop the rest, and shrink photos before they reach the site.

The order to do it in

  1. Look at one recent upload on the server.
  2. List every registered size and its source.
  3. Match each size to something visitors see.
  4. Search old posts for each size before deleting.
  5. Switch off unused sizes in a child theme.
  6. Remove old copies after a full backup.
  7. Resize photos to about 2,000 pixels first.

Step four is the one that prevents damage. The other steps save space and time, but deleting a size that old posts still point to leaves holes in pages nobody checks.

Another clear-out of things a site carries without anyone noticing is covered in Flash ends in 2020 and the parts of your site still using it.


Frequently asked questions

Why does WordPress save several copies of each image?

So each page can use a version close to the size it needs, and phones can download a lighter file than a desktop screen.

Where do the extra image sizes come from?

WordPress makes four, the theme adds sizes for its layouts, and plugins for shops, sliders and galleries add more. Each is made for every upload.

Do old themes leave image copies behind?

Yes. Copies made for a previous theme stay on the server after a redesign, and so do copies made for plugins that were later removed.

Is it safe to delete unused sizes?

Only after checking. Posts store the address of the size that was inserted, so deleting a size that old posts use breaks those images without warning.

How large should photos be before uploading?

Resize to the widest space the image will fill, about 2,000 pixels for a full-width banner, and save it as a good-quality JPEG.

Do online stores need more image sizes?

Usually yes. Product grids, zoom views and cart thumbnails each use their own crop, so trimming a store's sizes needs more care than trimming a brochure site.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Uploads folder filling the hosting account?

We can list every image size your site makes, point out the ones no page uses, and clear them safely.

Start a Conversation