Linux 软件免费装

AJAX Thumbnail Rebuild

开发者 junkcoder
RistoNiinemets
ristoniinemets
更新时间 2026年9月4日 20:40
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

image thumbnail optimize regenerate rebuild

下载

1.02 1.04 1.05 1.06 1.10 1.13 1.14 1.2.1 1.2.2 2.0.0 1.01 1.03 1.07 1.08 1.09 1.11 1.12 1.2 2.1.0

详情介绍:

AJAX Thumbnail Rebuild recreates the resized copies WordPress makes of every image in your media library. It does them one image at a time, so a library of any size gets through without running into the script timeout that stops the plugins which rebuild everything in a single request. You need this whenever the sizes change: a new theme with different dimensions, a plugin that registers a size of its own, or a size you have edited yourself. WordPress applies those to images uploaded afterwards and leaves everything already in the library at its old dimensions. Rebuilding fills the gap. On its screen under Tools you can: You can also work on one image at a time without leaving the media library: a row action rebuilds or optimises a single image, a bulk action hands a selection to the plugin's screen, and the attachment details panel - wherever it opens - rebuilds, optimises, or replaces the file. A replaced image keeps its id, title and address, so every post and product already pointing at it shows the new picture. Beyond rebuilding, each of these is off until you turn it on: This plugin requires JavaScript to be enabled. Contributions are welcome at Github

安装:

Upload the plugin to your blog, activate it, done. Everything is under Tools -> Rebuild Thumbnails: the rebuild screen itself, the registered sizes, cleanup, and a tab per group of settings.

屏幕截图:

  • Every image size registered on the site, with its dimensions and whether it crops.
  • Rebuild or optimise a single image straight from the media library.
  • Rebuild, optimise or replace an image from the attachment details, without leaving the page.
  • Optimising, using the programs installed on the server - or TinyPNG or ShortPixel where there are none.
  • AVIF and WebP copies of every generated image, served through a picture element.

升级注意事项:

2.1.0 Optimising and the WebP/AVIF copies can now be queued instead of run on upload, so uploading a batch of photographs no longer waits for them. Off by default; turn it on under Optimising. 2.0.1 Adds a filter for sites that write the WebP and AVIF copies but serve them some other way. Nothing changes unless you use it. 2.0.0 A full rewrite: the rebuild screen is rebuilt out of WordPress' own components, images can be rebuilt, optimised or replaced straight from the media library, and AVIF/WebP copies, optimising and upload settings are new (all off by default). Your existing images and settings are left as they are.

常见问题:

Does rebuilding change my original images?

No. A rebuild writes the resized copies again and leaves the file you uploaded as it is. The only setting that touches an original is "Also optimise the full size original" on the Optimising tab, and even then only the lossless programs run on it - never a re-encode.

What happens if I close the page while it is running?

It stops where it is. The images it had already got through keep their new copies and nothing is left half written, but the run does not carry on in the background - open the screen and start it again.

Optimising saved nothing on my images. Why?

Look at the Optimising tab: it lists which optimisers are installed on this server. Those re-pack a file rather than re-encode it, which is where the saving is. Where none of them is installed the plugin falls back to PHP's own image library, and since WordPress already wrote those files at that quality there is usually nothing left to win. On such a host, TinyPNG or ShortPixel will do the job over their API.

Uploading a batch of photographs is slow. Can that be fixed?

Turn on background processing, under Optimising. Optimising a file and writing its WebP and AVIF copies both happen while the browser is still waiting for the upload, and neither has to: with this on the upload finishes as soon as the resized copies are written, and the rest is queued. Action Scheduler runs the queue where a plugin provides it - WooCommerce and many others do - and WP-Cron runs it everywhere else. An image is served in its own format for the minute or two before the queue reaches it.

Is it safe to turn on AVIF or WebP copies?

Yes. The copies are extra files written next to your images; the originals stay exactly where they are, a copy that comes out larger than the original is thrown away, and the copies are deleted along with the attachment. Turning the setting back off puts the front end back to serving the originals. AVIF costs several times the processing WebP does, so expect uploads and rebuilds to take longer with it on, and where the server's image library cannot write AVIF the screen says so and the WebP copies go on being served.

Can it write the WebP and AVIF copies without serving them?

Yes, with one line of code. The screen has a single switch per format, but a filter separates the two, so the copies go on being written while the front end serves your originals - which is what you want when a CDN or the server itself hands the copies out: add_filter( 'ajax_thumbnail_rebuild_serve_copies', '__return_false' );

I turned on WebP or AVIF. Do I need to rebuild?

New uploads are converted as they arrive. For the images already in your library, run a rebuild once.

Can I replace an image with a different kind of file?

No - a JPEG can only be replaced by a JPEG, a PNG by a PNG. The attachment keeps its name and its address, which is what keeps every post and product already pointing at it working, and that only holds while the file type stays the same.

What does Cleanup delete?

Only resized files left on disk that no image size on this site refers to any more - what a removed theme or a size you no longer register leaves behind. It shows you the list and what it would free before anything is deleted, and the files your attachments actually use are never among them.

Does it need JavaScript?

Yes. The screen talks to the site over a REST API of its own, one image at a time, which is what keeps a large library from running into a script timeout.

更新日志:

2.1.0 2.0.1 2.0.0 The whole plugin has been worked through: one 430 line file is now a set of classes, the browser talks to a REST API of its own instead of admin-ajax, and the screen is built from the components WordPress itself ships. The screen: New, all off by default: Fixed: 1.14 1.2.2 1.2.1 1.2 1.12 1.11 1.10 1.09 1.08 1.07 1.06 1.05 1.04 1.03 1.02 1.01 1.0