If you're a WordPress developer, chances are from time to time, you just want a…
WordPress gives you the handy ability to define your image sizes, and even add new image sizes with a simple function. This allows you to serve the best sized image to the user without having to rely on the browser to resize everything. The problem is if you change your image sizes, or add new ones, old images will still be saved as old sizes. If you change your theme, this could especially be a problem, as images may look squashed or smushed if the theme uses custom sizes. That’s where Regenerate Thumbnails comes in. It’s the kind of thing that maybe should be rolled into core, but I’m happy to see it as a fully functional plugin.
What’s It Do?
Regenerate Thumbnails gives you the ability to automatically generate new image sizes for old images that have been previously uploaded, all at once, or one at a time. It does this by adding a new option in your Tools panel, and a new button next to each image in your Media Library. It also provides you with some debugging information along the way in case something goes wrong.
How’s It Work?
Once you install and activate the plugin, you will have two ways to regenerate your thumbnails. If you’d like to create new thumbnails for your images, all in one go, then go to the new Regen Thumbnails option in the Tools panel of your WordPress admin. In there you will find a single button labeled “Regenerate All Thumbnails.”
Click on this and the plugin will begin creating new image sizes, and show you a progress bar to track it. If you want to cancel at any time, click “Abort Resizing Images.”
You can also use the regenerate function one or a few images at a time. To do this, go to your Media Library by clicking on Media -> Library in your admin panel. If you hover over an image, you will see a new option, Regenerate Thumbnails. Click on this to create new image sizes for a single image.
If you want to batch create images for a selection of images, you can also check the box to the left of each asset in the Media Library. After you have checked each image you want to create new thumbnails for, select the new Regenerate Thumbnails option from the Bulk Actions toolbar at the top of the page. This will create new image sizes only for the images that you select.
Keep in mind, Regenerate Thumbnails will not affect images that you have already uploaded, in case parts of your theme still use it. It will simply create additional thumbnails in your newly defined sizes. That means that no old images will be deleted. I actually kind of wish this was an option available to us, but I can see why it’s not.
I saw function to delete all old image sizes at once on the WordPress forums, so I tested it out, and it works. But (and this is a big but), the process is irreversible, so please only delete old images after you have made sure you have absolutely no need for them anymore. If you are unsure, just leave them.
Costs, Caveats, Etc.
Regenerate Thumbnails is free to use, and is fairly basic. For that reason, it’s not updated terribly often but I’m sure that if there were a problem with it, we would see a new update very quickly, as Alex tends to be on top of things. Support might be hard to find, but I’m sure if you ask around you can find some help. Alex himself, however, you are not likely to find a ton of problems. And you can always leave your question below in the comments if you are having trouble.
- Plugin Info at Plugin Author Alex Mills’ Website
- Walkthrough at WP Beginner
- Walkthrough at WP Lift
- Support Forums
- Purge/Delete All Old Images Function (Careful!)
- Using Regenerate Thumbnails and WooCommerce