Size Shelf – Regenerate Thumbnails & Image Sizes

Description

Size Shelf regenerates thumbnails and other image sizes after you change theme, install a plugin that adds sizes, or edit a size in Settings Media. It also tidies up afterwards: it finds the leftover files of old and switched-off sizes, shows you exactly what it would remove, and moves them to a trash you can restore from.

Everything in this plugin is free. There are no locked buttons, no ads and no upgrade nags in your dashboard.

Regenerate thumbnails

  • Missing sizes only, all sizes, or just the sizes you choose. “Missing sizes only” is the quick fix after a theme switch: it only makes what isn’t there yet and leaves existing files alone.
  • Whole library, a date range, or images you pick. Pick images in the familiar Media Library picker, or select them in the Media Library list and use the Regenerate thumbnails bulk action. Every image also gets a Regenerate thumbnails link in the list view and a button on its edit screen.
  • Built for big libraries and cheap hosting. Runs are processed in small, time-limited batches. If PHP times out, an image crashes the editor, or you close the tab, the run is saved after every image and picks up exactly where it stopped. One broken image is logged and skipped; it never ends the run.
  • Progress you can trust. A live progress bar with time elapsed and time left, counters for regenerated, skipped and failed images, and a filterable log that shows each problem with its reason.
  • Never touches originals. Size Shelf only writes the generated sizes. Your uploaded files and the “-scaled” originals stay exactly as they are. Sizes larger than an image are skipped (WordPress never makes them), and a size that fails keeps its old file.

Image sizes

  • Every registered size in one list with its dimensions, crop, a shape preview, how many images have it, and where it comes from: WordPress, your theme, or which plugin.
  • Switch off sizes you don’t use. WooCommerce, page builders and themes often add sizes your site never shows. Switched-off sizes are no longer made for new uploads or regenerations. Nothing is deleted when you switch a size off.
  • Big image scaling. Turn WordPress’s automatic “-scaled” copy of very large uploads on or off.

Delete unused image sizes, safely

  • Dry run first, always. The scan lists leftover files from sizes that no longer exist (for example from an old theme) and files of switched-off sizes, with their total size. Nothing is moved until you confirm.
  • Files that are still used are kept. Files referenced by any image’s metadata are protected, and files whose names appear in post content or custom fields (for example a hard-coded photo-300x200.jpg in an old post) are kept and listed as “kept”.
  • A real trash with undo. Files are moved into a trash folder inside uploads, not deleted. Restore a whole batch with one click (its metadata is restored too), or delete it permanently when you’re happy.

WP-CLI

Everything works from the command line too, using the same resumable engine:

wp size-shelf regenerate [<ids>...] [--missing] [--sizes=<names>] [--from=<date>] [--to=<date>] [--yes]
wp size-shelf sizes · `wp size-shelf disable <size>` · `wp size-shelf enable <size>`
wp size-shelf cleanup scan|list|trash|restore|empty
wp size-shelf job [status|resume|cancel]

Size Shelf Pro

An optional paid add-on for people who want this on autopilot: background and scheduled runs, regenerating a Media Shelf folder, custom image sizes without code, WebP/AVIF sizes, and per-post-type size rules. The free plugin is complete without it.

Privacy

Size Shelf sends nothing anywhere. It has no tracking, no remote calls and no external services. It stores its settings and run history in your database, and cleanup records in its own table.

Screenshots

Installation

  1. Install and activate Size Shelf from Plugins Add New.
  2. Open Media Size Shelf.
  3. Choose what to make and which images, then click Start regenerating.

FAQ

Will it change or delete my original images?

No. Size Shelf never writes to, moves or deletes the uploaded originals (or WordPress’s “-scaled” and “-rotated” copies). It only makes generated sizes, and cleanup only ever moves leftover generated sizes into its trash.

What happens if my host times out halfway?

Progress is saved after every image. The next batch continues after the last finished image. If an image crashed PHP, it is marked as failed and the run goes on. If you close the page, the run waits as “Interrupted” with a Resume button.

How does cleanup decide what is safe to remove?

A file is only listed if it looks like a generated size of an image (name-300x200.jpg), sits next to that image, and is not referenced by any image’s metadata in that folder. Files of switched-off sizes are listed separately and only when you ask for them. Files whose names appear in post content or custom fields are kept. Every file is checked again right before it is moved.

Where does the trash live, and is it removed on uninstall?

In wp-content/uploads/size-shelf-trash/. Uninstalling removes Size Shelf’s settings and tables but deliberately leaves the trash folder, so files can never be lost by uninstalling. Empty the trash from the Trash tab first if you don’t need it.

Does it work on multisite?

Yes. Each site has its own sizes, runs, cleanup records and trash. It can be network-activated or activated per site.

Who can use it?

Administrators (the manage_options capability). Developers can change this with the size_shelf_capability filter. Regenerating a single image also requires permission to edit it.

Does it work with WooCommerce, Elementor and other plugins that add sizes?

Yes. Their sizes appear in the list with the plugin named as the source, and you can switch off the ones your site doesn’t use.

Where does the size’s “source” come from?

Size Shelf notes which sizes exist before and after your theme and plugins load, and matches size names to active plugins and the theme. It’s a good guide, not a guarantee; sizes added in custom code may show as “A plugin or custom code”.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Size Shelf – Regenerate Thumbnails & Image Sizes” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • First release.