Regenerate Thumbnails

Regenerate Thumbnails

Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your theme.
Rating:
4.6
star-rating-1star-rating-2star-rating-3star-rating-4star-rating-5
Active Installations:
1000000+
Last Updated:
Aug 14, 2023
WordPress Version:
4.7 or higher
Tested up to:
6.3.5

Regenerate Thumbnails

Easily regenerate all thumbnails for your images.

Save Server Space

Delete unused thumbnails and free up server space.

Adjust to Theme

Quickly adapt to a new WordPress theme with different featured image sizes.

In Memory of Alex Mills

Support the plugin and honor the author's legacy by donating to a worthy cause.

Version 3.1.6

  • Fix: Respect “Skip regenerating existing correctly sized thumbnails” setting.
  • Fix: Don’t delete all thumbnails when deleting old unregistered thumbnails size.

Version 3.1.5

  • Fix: Don’t overwrite ‘All X Attachment’ button label with featured images count.
  • Tested successfully with PHP 8.1.
  • Tested successfully with PHP 8.2.

Version 3.1.4

  • Fix: Don’t attempt to regenerate SVG’s.
  • Bump tested version.
  • Update dependencies.

Version 3.1.3

  • Update plugin dependencies to the latest version.

Version 3.1.2

  • Use wp_get_original_image_path() in WordPress 5.3

Version 3.1.1

  • Minor fix to avoid a divide by zero error when displaying thumbnail filenames.

Version 3.1.0

  • Bring back the ability to delete old, unregistered thumbnail sizes. Support for updating post contents is still disabled (too buggy).
  • Various code improvements including string localization disambiguation.

Version 3.0.2

  • Fix slowdown in certain cases in the media library.
  • Fix not being able to regenerate existing thumbnails for single images. Props @idofri.
  • Fix JavaScript error that could occur if the REST API response was unexpected (empty or PHP error).
  • Fix bug related to multibyte filenames.
  • If an image is used as the featured image on multiple posts, only regenerate it once instead of once per post.

Version 3.0.1

  • Temporarily disable the update post functionality. I tested it a lot but it seems there’s still some bugs.
  • Temporarily disable the delete old thumbnails functionality. It seems to work fine but without the update post functionality, it’s not as useful.
  • Try to more gracefully handle cases where there’s missing metadata for attachments.
  • Wait until init to initialize the plugin so themes can filter the plugin’s capability. plugins_loaded is too early.
  • Fix a JavaScript error that would cause the whole regeneration process to stop if an individual image returned non-JSON, such as a 500 error code.
  • Accept GET requests for the regenerate REST API endpoint instead of just POSTs. For some reasons some people’s sites are using GET despite the code saying use POST.
  • Make the attachment ID clickable in error messages.
  • Fetch 25 attachments at a time instead of 5. I was using 5 for testing.
  • PHP notice fixes.

Version 3.0.0

  • Complete rewrite from scratch using Vue.js and the WordPress REST API.

Version 2.2.4

  • Better AJAX response error handling in the JavaScript. This should fix a long-standing bug in this plugin. Props Hew Sutton.

Version 2.2.3

  • Make the capability required to use this plugin filterable so themes and other plugins can change it. Props Jackson Whelan.

Version 2.2.2

  • Don’t check the nonce until we’re sure that the action called was for this plugin. Fixes lots of “Are you sure you want to do this?” error messages.

Version 2.2.1

  • Fix the bottom bulk action dropdown. Thanks Stefan for pointing out the issue!

Version 2.2.0

  • Changes to the Bulk Action functionality were made shortly before the release of WordPress 3.1 which broke the way I implemented the specific multiple image regeneration feature. This version adds to the Bulk Action menu using Javascript as that’s the only way to do it currently.

Version 2.1.3

  • Move the error_reporting() call in the AJAX handler to the beginning so that we’re more sure that no PHP errors are outputted. Some hosts disable usage of set_time_limit() and calling it was causing a PHP warning to be outputted.

Version 2.1.2

  • When regenerating all images, newest images are done first rather than the oldest.
  • Fixed a bug with regeneration error reporting in some browsers. Thanks to pete-sch for reporting the error.
  • Supress PHP errors in the AJAX handler to avoid sending an invalid JSON response. Thanks to pete-sch for reporting the error.
  • Better and more detailed error reporting for when wp_generate_attachment_metadata() fails.

Version 2.1.1

  • Clean up the wording a bit to better match the new features and just be easier to understand.
  • Updated screenshots.

Version 2.1.0

Lots of new features!

  • Thanks to a lot of jQuery help from Boris Schapira, a failed image regeneration will no longer stop the whole process.
  • The results of each image regeneration is now outputted. You can easily see which images were successfully regenerated and which failed. Was inspired by a concept by Boris.
  • There is now a button on the regeneration page that will allow you to abort resizing images for any reason. Based on code by Boris.
  • You can now regenerate single images from the Media page. The link to do so will show up in the actions list when you hover over the row.
  • You can now bulk regenerate multiple from the Media page. Check the boxes and then select “Regenerate Thumbnails” form the “Bulk Actions” dropdown. WordPress 3.1+ only.
  • The total time that the regeneration process took is now displayed in the final status message.
  • jQuery UI Progressbar version upgraded.

Version 2.0.3

  • Switch out deprecated function call.

Version 2.0.2

  • Directly query the database to only fetch what the plugin needs (the attachment ID). This will reduce the memory required as it’s not storing the whole row for each attachment.

Version 2.0.1

  • I accidentally left a check_admin_referer() (nonce check) commented out.

Version 2.0.0

  • Recoded from scratch. Now uses an AJAX request per attachment to do the resizing. No more PHP maximum execution time errors or anything like that. Also features a pretty progress bar to let the user know how it’s going.

Version 1.1.0

  • WordPress 2.7 updates — code + UI. Thanks to jdub and Patrick F.

Version 1.0.0

  • Initial release.

Upgrade Notice

Support for WordPress 5.3

Good cleanup tool

By Denny Müller (redaquamedia) on November 20, 2024

Works fine and does what it describes.

And sorry to hear, that Alex has passed away.

Thanks for great plugin.

By Anil Chandra Robidas (anilkumer) on November 13, 2024

Nice Tools

Doesn't work well with -scaled images

By 21stcn on July 30, 2024

Wordpress scales down very big images, adding a 'full' image with '-scaled' suffix, and stores the original file and it's name in the db. RT plugin however regens thumbails based on the 'scaled' image, so all the intermediate sizes are re-named. This can break images when combined with offloading etc.

Unless I am missing something, this '-scaled' resizing of big images is default wordpress functionality so the RT plugin should handle it properly by using the original image (using functions like wp_get_original_image_url, wp_get_original_image_path) etc, so as not to orphan a whole set of thumbnails, use the wrong full image and generate a new set of intermediate sizes.

Eg:
These are the currently registered thumbnail sizes, whether they exist for this attachment, and their filenames:

  • thumbnail: 280×178 pixels (cropped to fit) 8C2A3575-scaled-280x178.jpg
  • medium: 300×300 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-300x200.jpg
  • medium_large: 0×0 pixels (thumbnail would be larger than original)
  • large: 720×1200 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-720x480.jpg
  • avatar: 180×180 pixels (cropped to fit) 8C2A3575-scaled-180x180.jpg
  • 1536x1536: 1536×1536 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-1536x1024.jpg
  • 2048x2048: 2048×2048 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-2048x1366.jpg
  • featured-medium: 700×446 pixels (cropped to fit) 8C2A3575-scaled-700x446.jpg
  • featured-large: 1398×1398 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-1398x932.jpg
  • extra-large: 1598×1598 pixels (proportionally resized to fit inside dimensions) 8C2A3575-scaled-1598x1066.jpg

The attachment says it also has these thumbnail sizes but they are no longer in use by WordPress. You can probably safely have this plugin delete them, especially if you have this plugin update any posts that make use of this attachment.

  • medium (old): 300×200 pixels 8C2A3575-300x200.jpg
  • large (old): 720×480 pixels 8C2A3575-720x480.jpg
  • thumbnail (old): 280×178 pixels 8C2A3575-280x178.jpg
  • avatar (old): 180×180 pixels 8C2A3575-180x180.jpg
  • 1536x1536 (old): 1536×1024 pixels 8C2A3575-1536x1024.jpg
  • 2048x2048 (old): 2048×1365 pixels 8C2A3575-2048x1365.jpg
  • featured-medium (old): 700×446 pixels 8C2A3575-700x446.jpg
  • featured-large (old): 1398×932 pixels 8C2A3575-1398x932.jpg
  • extra-large (old): 1598×1065 pixels 8C2A3575-1598x1065.jpg
  • cmplz_banner_image: 350×100 pixels 8C2A3575-350x100.jpg

Very useful plugin

By Asad (asadpro) on July 9, 2024

Very useful plugin. I have been using this plugin for the last 5 years.

This app saved my blog

By infinityfree on July 3, 2024

It should be built-in WordPress feature. So useful!

Au top !

By davs63 on March 23, 2024

Bonjour et merci à l'auteur

Ce plugin à sauvé mon site, ou en tout cas plusieurs heures de travail. Les images étaient présente dans le backup mais pas les miniatures. Donc je ne voyais plus rien dans la médiathèque. Et cette extension a recréé toute les mignatures !!

Il mérite les 5 etoiles

Convincing for years

By W★ (filmpuls) on March 3, 2024

Thank you for continuing to maintain this plugin in memory of Alex Mills. And it's commendable that WP-CLI and other alternatives are mentioned, which is anything but a matter of course.

Very useful

By Cinzia Gabellini (moltilearn8) on January 24, 2024

I used the plugin to regenerate featured images only after changing the theme, worked well with about 2000 images.

Most powerful and useful plugin

By Roman Biswas (romanbiswas512) on August 16, 2023

This WordPress plugin stands out as the most formidable one I've ever had the privilege of using.

Excellent plugin

By jorgeletralia on July 19, 2023

I just regenerated the thumbnails of 11,500 images with your plugin. It took 3.5 hours and did an excellent job, thank you very much!

Try other plugins too!

PDF Image Generator

Generate automatically cover image of PDF by using ImageMagick. Allow user to insert PDF link with thumbnail into editor and set as Featured Image.

Try Demo More Details

Smart Recent Posts Widget

Provides advanced recent posts widget,you can display it with thumbnails, excerpt, date, author, comment count and more.

Try Demo More Details

Recent Posts Widget With Thumbnails

List the most recent posts with post titles, thumbnails, excerpts, authors, categories, dates and more!

Try Demo More Details
Screenshots
Author Site Author Site

Try Regenerate Thumbnails With InstaWP

Contact Sales

Reach out to us to explore how InstaWP can benefit your business.