Skip to content
Guides

How to Optimize the Images Already in Your WordPress Media Library

By Harshit Arora · Nov 2, 2026 · 5 min read

How to Optimize the Images Already in Your Media Library. Robin blog, Guides
On this page

The short answer: Most image plugins only optimize what you upload from now on. The years of images already in your Media Library stay exactly as heavy until you run a bulk optimization. Back up first, test on a handful of images, then pick between a fast run in your browser or a slower scheduled run, and purge your caches when it’s done.

Installing an image optimization plugin feels like a fix, and for new uploads it is. Everything you add from today gets compressed automatically. The same goes for the image compression built into WordPress 7.1: it only touches new uploads.

The catch is everything you added before. If your site has been running for a few years, that’s usually most of your images, and they’re still sitting there at their original size. It’s like getting a new filing system for the office while the old boxes stay piled in the corner.

This guide covers why those older images are worth the effort, what to check before a bulk run, how to choose the right way to run it, and what to do afterwards.

Why your old images still matter

Older posts are often the ones doing the heavy lifting. A tutorial from three years ago can easily bring in more visitors than anything you published this month, and every one of those visitors downloads its original, uncompressed images.

There are also more files than you might think. For every image you upload, WordPress saves up to six smaller copies, from a thumbnail up to 2048 pixels wide, plus a scaled-down version of very large photos. Your theme and plugins often add a few more.

So 1,000 uploads can easily mean 7,000 files or more. To see how much space they take up, open Tools → Site Health → Info → Directories and Sizes and look at the uploads directory size.

Before you start: three quick checks

  1. Take a full backup of your site, files included, not just the database. It’s your undo button if anything goes wrong.
  2. Check your disk space. Most optimizers keep a copy of each original so you can restore it later, and WebP copies take up room too. Make sure your hosting plan has space for your current library to grow by roughly its own size while the backups exist.
  3. Test on a handful of images first. Optimize five to ten typical ones, say a photo, a screenshot and a logo, and compare them with the originals at 100% zoom. If they look right, the rest will too.

Run it now or schedule it?

There are two main ways to run a bulk optimization, plus a third for developers. The right one depends mostly on the size of your library and your hosting.

Run now Scheduled Command line
Speed Fastest Slow and steady Fastest
You need to Keep the tab open Nothing Have server access
Best for A few hundred images Large libraries, budget hosting Developers, huge libraries

Running it now processes images while you keep the page open. Close the tab, or let your laptop go to sleep, and it stops where it is.

Scheduled runs work through the library in small batches in the background, so you can walk away. They rely on WordPress’s built-in scheduler, which only runs when someone visits your site. On a quiet site, that means slow progress.

Tip: If a scheduled run barely moves, your site may simply not get enough visits to keep the scheduler going. Ask your host to set up a regular scheduled task (a “cron job”) for your site. Most can do it in a few clicks, and it keeps things moving whatever your traffic.

How to do it with Robin

Robin is our plugin, so weigh this accordingly. Here’s the whole process:

  1. Install and activate Robin from Plugins → Add Plugin. From that moment, new uploads are optimized automatically.
  2. Open Robin Image Optimizer → Optimize. On the Bulk optimization tab, Media library shows how many images were found and how many are still unoptimized.
Robin's Bulk optimization screen showing 9 of 10 images unoptimized and a Start Optimization button
Before the bulk run on our test site: 9 of 10 photos still unoptimized.
  1. Click Start Optimization and choose Optimize now (keep the tab open) or Scheduled optimization (runs in the background on a timer).
Robin's Select optimization way dialog with Scheduled optimization and Optimize now buttons
Robin asks how to run it and shows what it will process: images, thumbnails and WebP copies.

When it finishes, the same screen shows the totals and an optimization log. Click a few file names in the log to compare quality with the originals.

Robin's Bulk optimization screen after the run: 10 images optimized, 1.58 MB down to 907.22 KB, 44% smaller
After the run: 1.58 MB down to 907 KB, 44% smaller. One photo was already well compressed and saved nothing, which is normal.

Compression, WebP conversion and backups of your originals are free, with no account or API key. Continuous background processing, AVIF and command-line runs are part of Robin Pro.

After the bulk run

  • Purge your page cache and CDN, so visitors get the new files instead of copies saved earlier.
  • Check that next-gen formats actually arrive. Converted and served aren’t the same thing; our guide on whether visitors actually get WebP shows a two-minute check.
  • Spot-check your most visited old posts, since that’s where the savings matter most.
  • Decide what to do with the backups. Keep the originals until you’re happy with the results, then clear them to win back the disk space.

Common problems (and fixes)

  • The run stopped halfway. Usually a closed tab, a sleeping laptop or a server time limit. Start it again, or switch to a scheduled run.
  • Some images were skipped. Very large files can go over a plugin’s limit (10 MB per image on Robin’s free plan). Resize those originals first, then run it again.
  • A few images look worse. Restore them from the backup and try a lighter compression level for that kind of image, such as screenshots with small text.
  • Images were already optimized by another plugin. Compressing twice saves little and costs quality. If the old plugin kept backups, restore the originals there before switching.

Frequently asked questions

Will bulk optimization change my image URLs?
No. Compressed files replace the originals under the same names, so posts, pages and links keep working. Next-gen copies like WebP are added alongside them.
How long does it take?
It depends on your server, the number of images and the method you pick. A small blog can finish in minutes; a library with tens of thousands of images can take hours, which is where scheduled runs help.
Is it safe to run on a live site?
Yes, with a backup in place. Visitors keep seeing images throughout. If your server is modest, run it during your quietest hours.
Do I need to run it again later?
Not if automatic optimization is on: new uploads are handled as they arrive. A bulk run is a one-time catch-up for everything that came before.

Bottom line

An image plugin only fixes the future. The images that already get the most visits, on your oldest and best-ranking posts, stay heavy until you run a bulk optimization.

Back up, test on a handful of images, then run it now for a small library or schedule it for a big one. Purge your caches afterwards, and check that visitors actually get the WebP files. After that, automatic optimization keeps new uploads light, and you shouldn’t need another bulk run.