Your WordPress Media Library is a Mess

A person managing files in the cloud

If you have a website, it’s likely that your media library has accumulated some unoptimized files.

I recently did an audit for a small nonprofit that had been running their WordPress site for about ten years. What we found was an overstuffed digital attic: huge PNG images, videos eating up hundreds of megabytes of server space, old PDFs nobody had accessed in years, and zip archives that probably shouldn’t have been uploaded in the first place.

Up to 90% of digital data is not used. We collect. We store. We create and then don’t use. Data is the atomic structure of digital. Words, music, images, films, videos, software. It all ends up as data. Most data is like single use, throwaway plastic. What sort of society accepts 90% waste?

Gerry McGovern, “World Wide Waste“

That’s the law of space (and time): the more space you have, the more junk you will fill it up with. Adding storage is always easier than deleting what you no longer need. But there are real costs to this seemingly infinite, intangible digital space: to your site performance, to your hosting bill, and to the environment.

Back in my day…

An animation showing an interlaced GIF image slowly loading in a web browser.

If you built websites in the dial-up era, you already know this story. But, let’s wax nostalgic for a minute:

File size wasn’t an abstract concern in the early days of the web. A 200 KB image on a 56k modem cost you 60-seconds and a beep boop … and your image loaded incrementally.

Choosing the wrong file format, or skipping optimization, could mean the difference between a site that worked and a page full of broken image icons.

We had three formats to choose from (and we had to walk 3 miles in the snow to get to school every day):

  • BitMap and GIF (Graphics Interchange Format) – were the first graphics formats supported by HTML. GIF was perfect for simple graphics, logos, quick animations, and those blinking “under construction” banners that were everywhere on the early web. Capped at 256 web-safe colors. Photographs had to be dithered if saved as a GIF and the results were always pixelated.
  • The JPEG (Joint Photographic Experts Group) became the standard in 1992 and was a revelation for photographic images, introducing lossy compression that could squeeze a photo down to a fraction of its size. You chose your compression level deliberately, previewing the quality tradeoff before you committed.
  • PNG (Portable Network Graphics) – developed as a patent-free alternative to GIF with better quality and more colors.

Screens added another layer of constraint. Many monitors ran at 800 x 600 pixels (smaller than today’s phone screens in raw pixel count). If you sized an image incorrectly, it could overflow the screen, get clipped, or be resampled poorly. We weren’t just picking a format, we were working within a strict pixel budget.

Screen resolutions improved. Broadband arrived and storage got cheap. Suddenly, the limitations we had been working with evaporated and file size stopped feeling like anyone’s problem. The costs of our unoptimized media have became cumulative and hidden rather than showing up as a spinning progress bar.

Even if you live in a 5G world, speed matters

Broadband and fast wifi are easy to take for granted when you’re working at a desk with a new machine and a reliable connection. But we should not assume that’s the default experience of our website’s visitors.

Many people access the internet on pay-as-you-go mobile plans where every megabyte of data has a real dollar cost. Others are on older devices, slower connections, or both. The person managing your site and the person visiting it are often living in very different bandwidth realities, and designing only for the former is making a big assumption.

Page speed has direct SEO implications

Core Web Vitals are a Google ranking signal, and large images are one of the most common causes of poor scores. Mobile users on cellular connections still feel oversized images.

More data uses more energy

Files stored on a website live on servers that run 24/7, drawing electricity and generating heat that requires additional energy to cool. An old, unlinked file is still occupying storage and contributing a small share of the site’s overall resource use.

Multiply that across millions of unmaintained sites and cloud storage services and it’s part of why data centers in the US currently consume 4–5% of total national electricity, a figure that could reach as high as 17% by 2030 – thanks AI.

The big picture on file sizes

Before looking at fixes, let’s get a sense of the scale involved:

UnitSizeWhat it feels like
1 KB1,024 bytesA short plain-text email
100 KB~100,000 bytesA well-optimized web image
1 – 2 MB~1 million bytesAn unoptimized JPEG or PNG, ~1 min of MP3
5 – 10 MB~5–10 million bytesA larger PDF on your website
1 GB~1 billion bytes~200 smartphone photos, ~4 min of 4K video

Many websites I work with have been around for a few years and they are often host 10 GB or more of data. Most of that is content no one ever sees or even remembers uploading.

Is PNG making a comeback?

At first glance, PNG looks like a reasonable default; it supports transparency, it’s lossless, and it handles crisp interface elements well. These days, everything exports as a PNG — it’s the standard format for apps like Canva and Figma, screenshots, and even iOS images.

A lot of what gets uploaded to websites may not even see the inside of a photo editing tool. AI-generated PNG images go straight from the slop-machine to your website as 7MB graphics, form submitted images shunted right back up to the cloud with a single click.We take it straight to the web now, baby!

PNG may have the best PR team on the web but it’s the single biggest source of unnecessary file bloat I see in images on websites.

Remember, PNG is designed for flat-color graphics: logos, icons, illustrations with hard edges. Use it for photographs or gradient-heavy images and you can end up with files 3 to 10 times larger than necessary, with no visible quality difference.

Please, stop with the PNG files.

Use a modern image format

FormatBest forNotes
WebP (yay!)Photos, artworkBest option, smallest file size at good quality
JPEGPhotos, artworkWidely supported, solid fallback
PNGLogos, flat graphics onlyAvoid for photos, it’s HUGE
SVGLogos, simple graphicsIdeal for logos, tiny and infinitely scalable

The target for most web images is around 100 KB (or less), aim for a hard ceiling of around 300 – 500 KB for large hero images. If an image is over 1 MB, it almost certainly needs to be optimized before upload.

When should we optimize? Before we upload!

The best time to optimize is before the file goes into WordPress (or your CMS of choice). This may feel like an extra step but it’s faster than fixing things later, and let’s be real, you probably won’t fix things later.

  • For individual images: Affinity Photo is now free. It’s a full-featured image editor (Canva acquired it in 2024) available for both Mac and Windows.
  • For batch processing images: Affinity Photo has a batch job feature (File > New Batch Job) that lets you point it at a folder, set your output format and dimensions, and convert everything at once.

On Mac, ImageOptim is another excellent free option. Drag any image or folder into the app and it compresses files in place. The Windows version requires a paid license.

Replacing existing images in WordPress

If you’ve already got oversized images live on your site, you don’t need to hunt down every page they appear on. The Enable Media Replace plugin lets you swap a file directly in the media library and automatically updates all references site-wide.

Optimizing media already in your library

SmushIt is popular but I’m personally not a fan; the configuration and dashboard is harder for clients and there’s too many paid upgrades here. Check this blog post on Dev.to for Smush Alternatives for WordPress.

Converter for Media is a nice one not mentioned but it may require some extra config by your web host and/or developer. It does a great job converting to WebP format!

Dorian Gray in his attic
Dorian Gray enjoying his attic. The painting is by Ivan Albright and can be seen at The Art Institute of Chicago.

What else is lurking in your digital attic, I mean, media library?

Images are usually the first priority, but a full media audit looks at all of the other stuff you’ve squirreled away:

  • Videos hosted directly in WordPress should be moved to YouTube or Vimeo and embedded instead. Video files can quickly exceed 100 MB. That’s not what your web hosting is designed for.
  • PDFs and documents that aren’t actively linked from a public page don’t belong in the media library. Move them to a public Google Drive folder and link from there if needed.
  • Zip archives almost never belong in a media library. If you see them, they’re almost certainly safe to delete.
  • Sort images by file size and look for anything over 500 KB. PNGs are usually the culprit.

A note on “unattached” media: because of how some WordPress themes handle images, unattached doesn’t always mean unused. Download a file before deleting it if you’re not sure.

Better digital habits start today

Like all good habits, the hardest part of a media audit isn’t the cleanup, it’s preventing the same accumulation from happening again.

Start including these habits into your digital workflow:

  • Check file size before uploading.
  • Don’t upload that PNG.
  • Run a batch conversion on folders of new images before upload, especially if you’re dealing with bulk image submissions.
  • Schedule a media library review quarterly or annually. It doesn’t take long once the initial cleanup is done.

A well-maintained media library isn’t just tidier, it’s faster for your visitors, cheaper to host, and a small but real contribution to running a leaner, greener operation overall.

About the author