Overview
AJAX Thumbnail Rebuild describes itself as: “Rebuild your media library one image at a time, without script timeouts - and optimise, replace, or write WebP and AVIF copies of your images.”
It is active on 30,000+ WordPress sites and rated 4.8 out of 5 by 90 users on WordPress.org. Developers can extend it through 0 actions and 21 filters, listed below.
How to install AJAX Thumbnail Rebuild
- Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
- Search for it. Type “AJAX Thumbnail Rebuild” and pick the one by junkcoder.
- Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI
Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:
wp plugin install ajax-thumbnail-rebuild --activateRequirements: WordPress 5.7+ · PHP 7.4+ · tested up to WordPress 7.1.4
Hooks & customisation
AJAX Thumbnail Rebuild 2.2.1 fires 0 actions and 21 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.
// Filter whether this format is written.
apply_filters( "ajax_thumbnail_rebuild_{static::FORMAT}_enabled", (bool) ATR_Settings::get( static::setting_enabled() ) );
// Filter whether optimising and the copies are queued rather than run on upload.
apply_filters( 'ajax_thumbnail_rebuild_background_enabled', (bool) ATR_Settings::get( 'background_enabled' ) );
// Filter the copy formats and the order they are offered in.
apply_filters( 'ajax_thumbnail_rebuild_copy_formats', array( ATR_Avif::class, ATR_Webp::class ) );
// Filter the query arguments sent to the proxy.
apply_filters( 'ajax_thumbnail_rebuild_proxy_args', $query, $url, $args );
// Filter the finished proxy URL.
apply_filters( 'ajax_thumbnail_rebuild_proxy_url', $proxied, $url );
// Filter whether the front end serves the copies.
apply_filters( 'ajax_thumbnail_rebuild_serve_copies', (bool) self::enabled_formats() );Need AJAX Thumbnail Rebuild customised?
Tell us what you want changed, added or fixed and we'll reply with an estimate.
WP EXPERTS is independent and not affiliated with junkcoder. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.