Plugin Description:
Regenerate Thumbnails allows you to regenerate all thumbnail sizes for one or more images that have been uploaded to your Media Library.
This is useful for situations such as:
- A new thumbnail size has been added and you want past uploads to have a thumbnail in that size.
- You’ve changed the dimensions of an existing thumbnail size, for example via Settings ? Media.
- You’ve switched to a new WordPress theme that uses featured images of a different size.
Download:
- Download from WordPress.org (0 downloads)
Screenshots:
- The main plugin interface.
- Regenerating in progress.
- Interface for regenerating a single attachment.
- Individual images can be regenerated from the media library in list view.
- They can also be regenerated from the edit attachment screen.





Another good idea:
I saw many posts about ‘Regenerate Thumbnails’ where it was used mainly as a fix-it tool for invalid ‘_wp_attachment_metadata’ entries in database, e.g. after moving a wordpress-site to a new location. I had exactly this problem and found your plugin when I looked for solutions.
If a site only has a few images, the plugin (with an option like in my old sizes patch) is perfect already.
But if a site has more images or many thumbnail-sizes, it takes quite some time.
You could add an option which would rewrite the ‘_wp_attachment_metadata’ entry and skip the thumbnail recreation (if thumbnail already exists).
For this you would hook the ‘intermediate_image_sizes_advanced’ filter (used in /wp-admin/includes/image.php) and manually check for existing thumbnails by the given $sizes and strip the existing ones from $sizes and adding that existing size to (global) $metadata[‘sizes’][$size].
Then the following loop foreach ($sizes as $size => $size_data ) in image.php would only generate really missing thumbnails and still the correct $metadata would be returned by wp_generate_attachment_metadata() and could be written to db via wp_update_attachment_metadata(..)
Hope you understand what I mean, what about that?
Pingback: Strings Design Studio « strings-unlimited.com
Great job I like your type! Would genuinely like to right here your feedback on my blog site! I’m also searching for someone to assist me make web sites!
Hi Alex, thanks for the great plugin! Ran in to a bit of trouble with it and I’m trying to figure out what to do. I have Amazon S3 hosting for files, but run the WordPress on a self-hosted site (Host Gator). There is a plug in called “amazon S3” that transfers files from the media library to Amazon. When I ran the Regenerate Thumbnails plugin, it resized 49 images and failed on 57 more. Each failure showed that it was looking for the file in the old path (meaning NOT on Amazon S3, but on the web server where the WordPress is running. However, when I display any of those images in the media library, it shows a path to the file at Amazon S3. When I click View, the image displays – from Amazon. So my question is, how is Regenerate Thumbnails picking up the old file location? I wonder if there is a way I can update that? Thanks!
Well, the file needs to be local for this plugin to work. It can’t open and process remote files.
Great plugin!!! In WP 3.3 the lower bulk action selection did not work on my wordpress installation – maybe an issue..?
Anyway used the upper one and it worker as a charm! Thanks!
v2.2.1 fixes this issue. Thanks for reporting the bug! 🙂
Haha THAT was the fastest ever!! TOTALLY cool:) What is there to say:) Hey maybe you are a bond fan as me?
What movie… Hi, I am Jenny Flex… Of course you are Bond answers:)
Thanks again!
The plugin appears to be broken with the latest update and generates a WordPress error “are you sure you want to do this?”. According to the following website an essential string of code is missing: http://nooshu.com/wordpress-are-you-sure-you-want-to-do-this
Same Error! 🙁
What specific action(s) causes the error to occur? I can’t seem to reproduce it myself.
If you go directly to the media library and searching for an specific image!
Filtering posts by category using the dropdown menu in the Posts section triggers the “are you sure you want to do this” error.
Same error !
Same error. It occurs when we do a search in the posts page or in the media page.
Oh, I can reproduce it and I realized the mistake I made.
Upgrade to version 2.2.2 (it’ll show up on WordPress.org very soon) and it’ll fix the issue.
Sorry for the trouble!
Thanks, Alex. Great plugin BTW.
Hi Viper! Do you have a change log describing version 2.2.2 that we can read? Regards, Carlos.-
http://wordpress.org/extend/plugins/regenerate-thumbnails/changelog/
Thank you for the plugin and update.
good luck
Thank you for fixing this 🙂
I love this plugin, and its something that should be part of WP core.
I do need to delete old thumbnails though, and am weary about trying the script listed above.
Many thanks. Just realised there’s such a plugin.
Hi Alex, I am experiencing a showstopper that seems so obvious, but is leaving me stumped. Regen Thumbnails is failing on all images seemingly due to it using the wrong path.
Here’s one of the error log messages;
“Aston Martin DBS Touchtronic” (ID 28110) failed to resize. The error message was: The originally uploaded image file cannot be found at /home/public_html/mywebsite.com/public/htdocs/uploads/http://www.mywebsite.com/wp-content/uploads/2010/05/DBS-touchtronic_banner.jpg
The image exists at ‘http://www.mywebsite.com/wp-content/uploads/2010/05/DBS-touchtronic_banner.jpg’, but obviously it should only be appending ‘/2010/05/DBS-touchtronic_banner.jpg’ rather than the fully-qualified domain.
I’m using the latest WP version 3.3.1 and there are no additional plugins on the site. Any thoughts?
There is one small issue in your plugin. When _wp_attached_file is filled with full path with http:// it will cause failure while resizing.
You can easily fix it with this code (just add it right after fullsizepath definition):
if (stripos($fullsizepath, site_url(‘wp-content/uploads/’)) !== FALSE)
$fullsizepath = str_ireplace(site_url(‘wp-content/uploads/’),”,$fullsizepath);
Why would the path be set to a URL?
I am seesing the same thing. The path displays the url of the site.. and the funny thing is teh URL is in the middle of the path.. this gives an error on all image resizes
It’s strange behaviour of latest wordpress. Can’t really say why path include URL, but it’s a common problem — I saw several posts about it. Even here Steve Davies is complaining about it.
Thanks for the plugin, saved my life 🙂
Pingback: Working on Excerpts, Thumbnails and Teasers | Word Grrls
I appears that the plugin is looking for the images in the wrong folder. Also I do not have anything specified in “media settings” – “upload files”
When I click on “regenerate all thumbnails” I get the following error for all images:
1.”pay_off_debt_fast” (ID 2163) failed to resize. The error message was: The originally uploaded image file cannot be found at /home6/yogadivi/public_html/creditvisionary/wp-content/uploads/public_html/creditvisionary/wp-content/uploads/2012/02/pay_off_debt_fast.png
Pingback: 24 Stable WordPress Plugins For A Better Publishing Experience | Web Help 101
Pingback: 24 Stable WordPress Plugins For A Better Publishing Experience | WebDesignBasis.com
Pingback: ????? ???????????? ??????? | Andrey.ws
I’m getting an error when I try to use the plugin, either in single or bulk mode:
Debugging Information
Total Images: 1
Images Resized: 0
Resize Failures: 1
function () {if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this;}
And I noticed someone else on the WP forum is having the same issue: http://wordpress.org/support/topic/plugin-regenerate-thumbnails-odd-php-when-failing
Any ideas?
did you ever get a solution to this? I am also getting php errors:
function () { if (!d) { var c = arguments, g, h, i, j, k; b && (k = b, b = 0); for (g = 0, h = c.length; g < h; g++) { i = c[g], j = f.type(i), j === "array" ? e.done.apply(e, i) : j === "function" && a.push(i); } k && e.resolveWith(k[0], k[1]); } return this; }
I had to delete some of the original larger files due to space issues. i returned them all in order to regenerate thumbnails which is when this error occurred. it seems the files are being created but all at 0kb.
i am using WP 3.2.1.
and the latest plugin version
I never managed to reproduce that error (so I have no way of fixing it) but according to this forum thread it was some type of permissions error apparently.
thanks – i tried editing the permissions but it’s still doing the same thing. i think it must be because i deleted then re-added the originals possibly, cause the ones where i didn’t do that are working fine. the files still show on each posts featured image though, and in the media section, so WP knows where they are. so weird!
okb meaning 0Kb!
Actually I did a bit of Googling and may have figured out what’s up. I think the AJAX request is failing.
Great plugin, works perfect! I had to regenerate over 250 images of my wordpress gallery. I took less then one minute with this plugin!.
I’m also getting the same error as Daryl:
Resize Failures: 1
function () { if (c) { var a = c.length; m(arguments), i ? (k = c.length) : e && e !== !0 && (j = a, n(e[0], e[1])); } return this; }
Thanks.
Hi there–I’m helping to get a wordpress blog going, and the blogger wants to do most of the posting with an iPad. I’ve found an app she likes and everything works well, except that none of the photos uploaded via the app show thumbnails in the WP admin Media Library.
The cause seems to be that the uploaded images have _wp_attachment_metadata key values of “a:0:{}”, whereas images attached “correctly” via the media library interface have a lot of stuff in their _wp_attachment_metadata keys.
Your “Regenerate Thumbnails” plugin seemed like exactly what I was looking for, except when I run it, it completely ignores the images with missing thumbnails, while regenerating thumbnails for all the other (already fine) images.
I ran across a post (https://wordpress.org/support/topic/failed-to-resize-the-error-message-was-unknown-failure-reason) indicating that one possible workaround might be to edit the regenerate-thumbnails.php file directly to change the method by which the plugin enumerates its list of image files, but I wanted to check here first to see if you had any other tips. I can post screenshots and code snippits if it might be helpful. Thanks!
I would track down the issue to the root cause — why is the app failing to properly upload images? If she’s uploading images via the app but they aren’t showing up in the Media Library properly, then something is wrong.
I would recommend using the official WordPress app if that’s not what she’s using.
Thanks, Alex. I’m also contacting the app’s author (it’s Blogpress, from here: http://itunes.apple.com/us/app/blogpress/id317799861?mt=8). The app does indeed upload and they show up in the appropriate subdirectory under wp-content/uploads, but they don’t have auto-generated thumbnails with them (no “…150×150.jpg” or “…300×300.jpg” files like other uploaded images have). Something’s obviously not right.
Will try to shift her to the official wordpress app, but it’s extremely crash and when you embed images in posts, it shows them as html code instead of as a picture, which is what drove me to an alternative app in the first place.
Thanks!
Follow-up: when I select one of the non-regenerating images on the Media Library page and then choose “Regenerate Thumbnails” from the Bulk Actions drop-down, the screen changes to the Regenerate Thumbnail page and the plugin reports an error under the Debugging Information heading, saying “Failed resize: 102 is an invalid image ID.” The image ID that it lists changes depending on which image I select.
Hi there, I have the same problem and can’t find any solution!! Has somebody an idea? Please help! What causes the invalid image ID failure?
Pingback: The Top 100 WordPress Plugins For Your Site
Pingback: WPMU’s 100 Best Plugins | Talking Wordpress
Pingback: 6 WordPress Plugins I Can’t Live Without
Pingback: The Top 100 WordPress Plugins For Your Site « Mõtteid IT maailmast ja selle lähistelt
Pingback: Top 100 WordPress Plugins yang Perlu Ada | Wan Rizuan Blog
Hi, I’ve been using this plugin on several websites, and it is easy to use..
but I am currently working on a new website, the plugin does not seem to have an error but it does not create any thumbnails on the uploads, in fact there is not thumbnails created other than the original image,
just wandering if is it because of my server settings or something?
If you upload a new image and no thumbnails are created, then it’s a server issue, most likely your host doesn’t have the GD image manipulation module installed.
phpinfo()will tell you: http://codex.wordpress.org/Finding_Server_InfoHi Alex,
please have a look at the following link
http://stylesoflondon.co.uk/catalog/egan/
can you tell me why once the images have been regenerated they are differnt sizes?
thanks for any support
regards
Gareth
They are being resized proportionally. If you want them cropped, then you’ll need to enable that. You can enable that for the smallest thumbnail size at Settings -> Media. Cropping for other sizes will need to be enabled via code in your theme.
Love the plugin, using it on a bunch of sites! Ran into an issue – One site got hacked and I renamed wp-content as a precaution to avoid future problems. Unfourtunately I can no longer regenerate thumbnails (which is desparately needed after moving data to a fresh WP install). I think the problem is that the plugin looks for images in wp-conent which I no longer have. How do I get the plugin to look at the new dir?
The path is stored in the database so you’ll have to change it there (the post meta for each upload). This is core WordPress behavior.
Yep, plus “uploads” folder in Media settings needed to be changed. All good now. Thanks!
Pingback: The Top 100 WordPress Plugins For Your Site | Multidots Solutions
This seems like an awesome plugin and everyone can get it work, except me ;-(
Can you tell me if I’m doing this correctly: I have images loaded in the media library, and I have ‘settings > media’ with thumbnail images set to 150 pixels wide. As a result I have thumbnail images in my posts that are 150 pixels wide. All good so far.
When I change my ‘settings > media’ thumbnail size to 100 pixels wide, I go to ‘tools>regen thumbnails – regenerate all thumbnails’. I click the button, and get a message ‘all done!’. Then I check the posts, and all the images are exactly the same as they were – 150 pixels wide.
Any help greatly appreciated!
This plugin doesn’t go through your posts and update hard-coded links to thumbnails (yet). I was playing around with some code that would do that but I never completed it. Ran into some issues but I should probably work on resolving them.
Currently this plugin is most useful for post thumbnails and gallery thumbnails, both of which are dynamically generated rather than hard-coded in your post’s contents.
That makes sense, I found some images, such as those in galleries that had been modified by the plugin while others were untouched.
Many thanks for your response!
It’s my experience that the Tools > Regen. Thumbs page will delete the existing files and replace them with the new settings, while the image-by-image conversion on the Media page will add the new resizes and leave the existing files in place.
Is this difference on purpose?
Could be a nice feature on the Regen All page to be allowed to keep the existing files if you wanted to.
My plugin calls the same thumbnail generation function that is called when a file is uploaded. This functions does not delete any files from your server which is important because posts contain hard-coded links to those old thumbnails.
The only thing the thumbnail function does is generate thumbnails for all of the thumbnail sizes that are currently registered (large, medium, small, any featured post sizes, etc.) and then store that data in the meta data for the upload.
hm… i set thumbnail size to 250×250 and tick for “Crop thumbnail to exact dimensions (normally thumbnails are proportional)”, but what i got is not exactly 250×250. Some image becomes 250×233 or 250×245.. where the hell those numbers come from ?
All I want is just a fixed 250×250. Unticking make it worst, it becomes 250×180 or 250×170…
?????
Weird. How big are the original images? Bigger than 250×250?
Hi Alex,
I have the following error :
function () { if (c) { var a = c.length; m(arguments), i ? (k = c.length) : e && e !== !0 && (j = a, n(e[0], e[1])); } return this; }
And it seems i’m not alone.
Can i help you fix-it (giving you an access to the admin page) ?
Best regards and thank you for your job
Sure! Create a new administrator account just for me (so you can remove it later) and e-mail me the log in details. 🙂
Pingback: Our top 10 must-have and must-avoid WordPress plugins
Hi Alex,
I’m re-designing my blog & have updated from a previous version of AutoFocus
so I tried used this plug-in as advised but I keep getting this error on any & all image i try to regenerate.
function () { if (c) { var a = c.length; m(arguments), i ? (k = c.length) : e && e !== true && (j = a, n(e[0], e[1])); } return this; }
Any suggestions??
That seems to occur when the AJAX handler returns invalid JSON and jQuery freaks out.
I recommend you use Firebug or Chrome’s developer tools to see what the AJAX response is.
yikes… AJAX? JSON?? jQuery???
i don’t know what any of these terms mean, lol :/
clearly i’m not very experienced in this
any other suggestions,
or any way you could explain it in lamens terms??
i appreciate your quick response!
thanks
Oh, sorry! 🙂
Something isn’t working right. I can debug for you if you make me a new administrator account on your blog and then send me the log in credentials via http://www.viper007bond.com/contact/ (don’t post them here as a comment)
Or alternatively you could try temporarily disabling all other plugins to see if that fixes it (probably not but worth a shot).
Why my pictures don’t appear on the website? I have loaded these in the library and i use “Regenerate Thumbnails” but nothing… Help me please
Hi Alex
I am facing a problem after changing the hosting. I am not really good with PHP.
“Seo” (ID 726) failed to resize. The error message was: The originally uploaded image file cannot be found at 2011/12/Seo.jpg”
all images are uploaded but I still get that error
Pingback: ??? 100 ????? ?????? ????
Hi,
Same problem for me. 600 images at good 4700 and made ??error in running.
I ssh dont add, unfortunately, please tell me what must to write. thank you very much
function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this}
Pingback: 100 Best Wordpress Plugins by Webworx | Wordpress Web Designer
Here’s a strange questions. Everything was working fine with my thumbnails and galleries. Then I decided I wanted to resize them all with the Regen plugin. Now I can’t add a thumbnail from gallery images (new or existing) but I can add any other size.
What’s more is that if I add a thumbnail to a post in the HTML editor and then switch to the visual editor it doesn’t show up. When I click back to the HTML viewer there is a mysterious new class on the images called “ufrsgmtduachvsovggko”. That line gets added to the class every time I switch from HTML to Visual. There maybe be several on each image. Where is this coming from? Why can’t I display any thumbnails or galleries anymore?
Also, The class “ufrsgmtduachvsovggko” only gets added to the thumbnails on a page. It doesn’t add itself to any other sizes that are within the same post.
Frankly I haven’t a clue. I’ve never heard of anything like that.
Awesome plugin!! It’s already saved me tons of time.
Does your plugin support external images? I was able to use the Auto Featured Image plugin to set features on posts with linked images. How does your plugin handle these featured images since they are not uploaded as media?
Thank you in advance.
Nope. My plugin walks through all of the images in your Media Library and resizes them. It doesn’t look at posts.