Linux 软件免费装
Banner图

Thumbwright – Regenerate Thumbnails & Delete Unused Image Sizes

开发者 alidadeeditions
更新时间 2026年11月25日 23:41
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

image sizes thumbnails regenerate regenerate thumbnails delete unused image sizes

下载

1.1.0 1.0.0 1.1.1

详情介绍:

Regenerating thumbnails is only half the job: every regeneration leaves the old, unused image sizes on disk, and deleting them blindly can break pages that still show them. Thumbwright does both halves. It regenerates thumbnails in steps that resume after a closed tab or a server time-out, then lists the old files in a dry-run report, keeps every file still named in your content, and checks each file again just before deleting it. Deleted files first go to a free 30-day trash, so any clean-up can be put back in one click. Where Thumbwright looks before deleting: posts and pages, custom fields, options and widgets, menus, comments, category and tag descriptions, and the extra data of terms, users and comments. If an old size file is named in any of them, it is kept (safety check, on by default; the FAQ says what is not searched). Changed theme, or changed the sizes in Settings > Media? Your existing images keep their old sizes until you rebuild them. Thumbwright rebuilds them, even on large libraries, and helps you get rid of the files you no longer need, without ever touching your originals. Two clicks Rebuild Built for large libraries Safe clean-up A free trash to undo any clean-up Also Thumbwright Pro Thumbwright stays complete on its own, trash included. Thumbwright Pro is a separate paid add-on for large sites: let big jobs run with the page closed, and rebuild the sizes on their own when your theme changes. Requires the free Thumbwright plugin. 1 site $39/year, 5 sites $79/year, unlimited sites $149/year. Refund within 14 days, no questions asked. Licences, payment and updates by Freemius; this free plugin never contacts Freemius.

安装:

  1. Install and activate the plugin.
  2. Go to Tools > Image Sizes.
  3. Choose what to rebuild, or start a clean-up dry run.
You can also select images in Media > Library (list view) and choose "Rebuild sizes" in the bulk actions, or use the "Rebuild sizes" link under one image.

屏幕截图:

  • After the repair, the dry run shows each image with its old files and their size, before anything is deleted.
  • The free trash: every clean-up stays 30 days, and goes back in one click with "Put back".
  • Rebuild the sizes of one image straight from the media library.
  • Settings: images per step, memory, image types to skip, the safety check and the trash.

升级注意事项:

1.1.1 No code change: clearer name, new description and screenshots. 1.1.0 A 30-day trash: put any clean-up back in one click.

常见问题:

Will it delete my original images?

No. Rebuilding never deletes anything, and the clean-up never considers the original upload, the main file, current sizes or edit backups. It only lists files named like a size of the image (photo-300x200.jpg), and only deletes them after you have read the dry run and confirmed.

What if a post still uses an old size?

Before listing a file, the clean-up searches the WordPress tables for its name: posts, menu item labels, custom fields, options, comments, category descriptions, and term, user and comment meta. The old Link Manager (hidden since WordPress 3.5) is not searched. If it is found, the file is kept. Old post revisions are not searched (on most sites they would keep nearly every file): if you restore an old revision, check its images. Tables created by other plugins (sliders such as Slider Revolution, SEO caches) are not searched; such plugins can use the thumbwright_file_in_use filter. We still recommend a backup of the uploads folder before deleting.

I use a page builder. Are its images protected?

Yes for content stored in the WordPress tables, including the raw HTML and code blocks of WPBakery and Avada, which are stored encoded. Not covered: tables of their own (for example Slider Revolution's slides), pages stored in files, and themes that build image file names on the fly in their code. For those, use the thumbwright_file_in_use filter, read the dry run carefully, and keep a backup.

Can the clean-up miss a file my theme uses?

Yes, in one case: a file named like an image size (banner-1600x300.jpg) that is not a media item and is only referenced from a theme or plugin file (CSS, PHP). Such references cannot be detected. Read the dry-run report before deleting, and keep a backup.

What about images I edited in WordPress?

They are rebuilt from the edited version (crop, rotation, scale). Sizes you set apart in the image editor ("thumbnail only", "all sizes except thumbnail") are kept as they are and reported. A restored image is rebuilt from its original upload.

Are WebP copies made by my optimisation plugin removed?

Copies named like the size with another extension (photo-300x200.webp) are kept as long as their size is in use, and listed with it once it is old. Copies with a double extension (photo-300x200.jpg.webp), and the copies of the Modern Image Formats plugin (photo-300x200-jpg.webp), are never touched, even when their size is old: remove them with the plugin that made them.

I switched my sizes from JPEG to WebP. Why are the old JPEG files kept?

When an old JPEG has exactly the same dimensions as a new WebP size, it looks like a copy made by an optimisation plugin, so it is kept to be safe. Remove such files by hand after checking your pages.

My server times out. What can I do?

Nothing is lost: resume the task. Then lower "Images per step" in the settings, or raise "Memory for image work" (for example 512M) if your host allows it.

Where are the trashed files, and are they public?

In wp-content/uploads/thumbwright-trash/, one folder per clean-up, with the same sub-folders as your uploads. The folder holds an .htaccess file that closes it to visitors on Apache and LiteSpeed; on Nginx, image files there can still be opened by someone who knows their exact address, as they could before the clean-up. Deleting the plugin (not just turning it off) deletes the trash for good.

When is the space freed?

When the files leave the trash: 30 days after the clean-up, or as soon as you choose "Delete for good" on the Trash tab. Turn the trash off in the settings to free the space at once.

Do I need to clear my page cache after a clean-up?

Yes, if you use a page cache (caching plugin, host cache, Cloudflare). Cached pages may still show the old image files until the cache is cleared.

My theme adds a size with the intermediate_image_sizes_advanced filter only.

Thumbwright follows that filter when rebuilding, but the clean-up only knows sizes registered with add_image_size(). Files of a size added by the filter alone are listed as a size "no longer registered" (the dry run names it): leave them out by not deleting, or register the size with add_image_size().

Does it work with images stored on S3, Cloudflare R2 or a CDN?

Only with files present in the uploads folder of your server. Images offloaded to external storage are not supported in this version.

Does it work on multisite?

Yes, site by site: open Tools > Image Sizes on each site, or use --url= with WP-CLI (there is no --network option). The check for files used in content only looks at the current site: if one site shows an image from another site's uploads, keep a backup before deleting.

Who can use it?

Administrators only (the manage_options capability).

更新日志:

1.1.1 1.1.0 1.0.0