Regenerate Thumbnails

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:

Screenshots:

823 thoughts on “Regenerate Thumbnails

  1. I third Jan-Mark’s comment. I read this thread solely to find out what to do after activating the plugin. It’s not enough to have a mention on wordpress’ plugin download site, because as of wordpress v3, you install plugins internally and don’t visit that site. Further, I was instructed to install it by another plugin, so I really had no other interaction with that page.

  2. Great! ๐Ÿ˜€ You are a life saver. Actually I was developing this plugin -> http://wordpress.org/extend/plugins/wp-category-posts-list/ and really needed something to regenerate the thumbnails as it registers different post thumbnail sizes as per the user input. If the user changes their thumb size, then it will register another thumb size using add_image_size which would cause HTML resizing of the featured images of previous posts! It was really a headache for me, as then using timthumb seemed the only solution! But on the other hand I really wanted to use the new featured image feature of WP ๐Ÿ™‚ . You have really given me a solution… All I need to do is ask the user to run your plugin once after changing/setting the post thumbnail size…. Hats off to you ๐Ÿ™‚

  3. I seriously don’t know whats going wrong with WP Plugin directory ๐Ÿ™ It is not showing tabs, maybe not pursing the readme.txt file properly! I had seen this for some other plugins as well!

    @Dave Carr, Buddy you should try installing it from your admin>plugin>add new and search for the keyword thumbnail. You should find it there!

    I hope WP solves their issue soon… @Alex do you have any idea why is this happening??

  4. Hey.

    I search the plugin too . . . . What the hell is going on ?
    Does somebody have the plugin and can re-upload it on another platform ? Like his FTP ? Thanks ! Really.

  5. Pingback: WP Category Post List Plugin – List your posts filtered by categories with thumbnails | InTechgrity

  6. Pingback: Regenerate Thumbnail size for attachment images wordpress | InTechgrity

  7. Pingback: Tema Mystique: come rigenerare le miniature dei post

  8. All thumbnails and custom thumbnail sizes were working just fine until today when i ran the regenerate thumbnails plugin, and my custom thumbnail sizes are no longer working. It seems that the plugin has changed it so that all custom sizes now simply load the regular size instead of the custom one. In Safari’s activity window it used to show the correct thumbnail files loading, but after running the plugin all thumbnails load the original image file instead. What could be causing this?

    • My plugin hasn’t changed and it doesn’t do the resizing itself or anything, it just tells WordPress to do it. It’s merely two function calls on one line in my plugin.

      So if something isn’t working, then it’s an issue with WordPress or more likely with how you are registering your custom image sizes.

  9. I ran this today after changing my media settings to a slightly smaller size. Now that I look at my site, all of the images posted are still the old larger size… did I do something wrong? Is there another step to get my blog to realize that all of the old images should now be smaller?

    • This plugin only affects images in [gallery] and post thumbnails for the time being as manually inserted single images have been hard-coded into your posts (edit the post and you’ll see what I mean).

      I’ve been experimenting with some code that goes through your posts and updates all <img> tags, but it’s not quite ready for release yet.

  10. when I’m trying to regenerate thumbnail… I didn’t even closing page, but it stops. sometimes on 4% process, sometimes 37%, once it was 85%… but never 100% =(
    WP version. 3.1,

    ps. And where all that thumbnails stored? I mean as pictures on server, and as information in db?

  11. Pingback: ayuda con los thumbnails de este theme

  12. Pingback: Alter Free Branford Magazine theme to use Wordpress Thumbnail instead of timthumbs | Dx3webs | UK Magento e-commerce hosting

  13. Hi Alex,

    I’m currently switching my own theme to WP 3.x compatibility and have enabled support for several different sized post thumbnails (featured images). I need to regenerate all older images to the new defined images sizes and would really love to use your plugin for this. However, the plugin always stalls after only 1%. Presumably a resize is failing like you already mentioned to nstaru, but I can’t figure out which image breaks the plugin.

    We currently have little over 2000 images (Media | Library) and I’d hate to start all over again if the plugin suddenly stalls or bails at image 1600 (like I think it currently does).

    Does a solid donation help in giving the plugin some TLC, providing better error reporting and hopefully picking off without regenerating all over again? Or do you know of any other way to process 2000 images automatically with all the needed sizes?

    • You can easily see which image it is failing on using Firebug or some other tool that shows you AJAX requests. The image ID will be in the URL.

      The solution is probably to increase the amount of memory allocated to PHP. Large images take quite a bit of memory to resize.

      • Thanks. Will check with Safari’s console.

        PHP’s memory allocation is already at 256MB (dedicated server), so I don’t think that’s the issue. It’s probably stumbling on a missing or broken image, I just need to find out which one, but hopefully the console will offer some insights.

  14. Hmm, this is not really helpful at all ๐Ÿ™

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) /wp-admin/admin-ajax.php
    
  15. Sorry for the avalanche of comments, but FireFox with Firebug is more helpful than Safari’s console. I keep getting 500 Internal Server Error for random images, e.g. ID 32 which was perfectly processed the previous time I ran Regenerate Thumbnails. What other settings do you recommend to look at? Does it help to run Regenerate Thumbnails from the command line or doesn’t that solve anything? (if it works at all). I’d rather see a ‘Skip errors and continue’ setting and log troublesome images to a file or anything so I can fix these manually.

    As asked in my previous comment, is there another way to process 2000+ images automatically with all the needed sizes?

    • If you’re getting a 500 error, then that’s something with your server, not my plugin. No idea what could be causing it.

      And no, there’s no other way to force a resize. That’s the whole reason I wrote my plugin — because there wasn’t a way to call the needed resize functions. ๐Ÿ˜‰

  16. This plugin just saved my life (a few hours of it that’s for sure). A much needed functionality which I wish was included in the default build.

  17. Hi Alex,

    Just about to use the plugin and thought I’d ask before running the batch… I have about 11K images to automate and regenerate the respective thumbs to for a large live website, and I’d like to know if in your opinion I may risk to get the system stuck while running this through. This must be a one-off only process and I cannot clearly risk to either get the system down due to script overload or loosing any of the images… any recommendation would be much appreciated.

    Lastly, as feedback, wouldn’t it be good to allow selection of timestamp of thumbs regeneration? For instance allowing the possibility to regenerate thumbs by period, day, month, year… just a hint.

    Thanks

    • Yes, this plugin needs further refinement and more options. It’s on my long, long todo list. ๐Ÿ™‚

      As for overloading your server, that’s a possibility. It only does one image at a time, but it tries to do each of those images as fast as it can. I’d recommend doing it at night but even then it’s likely going to take a long time. It could cause problems, it depends on your server configuration.

  18. I gave your plugin a try because I wanted to Alter the size of thumbnails in a WP 3.0.1 site.

    I tried change the media options for thumbnails to 100×100 and saw that had no affect. So, I installed your plugin and clicked “regenerate” It says it completed 100%, but appears to have done nothing to the website’s images as all the images are still 150×150 despite the new settings in media.

    Does this plugin have any logging?

  19. Hey, thanks for the great plugin. It is something that I think should be added to the core and done when you change the settings in Media.

    Anyway, I’m keen to find out about the update to change the hard-coded HTML in the posts. I don’t really want to do it manually on all my websites but I guess for now I can.

    Thanks a lot man. No pressure at all if the update is not ready. ๐Ÿ™‚

  20. Pingback: My recommended WordPress plugins « Enemy – Coax's Music And Stuff

  21. Pingback: Regenerate Thumbnails v2.1.0 (and v2.1.1) Released « Viper007Bond.com

  22. Yeah, there are many difficulties for dummies like me ๐Ÿ™‚

    With this Plugin its really easier to change and edit the Thumbnails without open an extra programm ๐Ÿ™‚

  23. Pingback: WordPress Plugin Releases for 11/24 « Weblog Tools Collection

  24. This plugin works fine to regenerate individual thumbnails in the media library, however, when I select multiple images and click on the Bulk Actions drop down menu, there’s no option to Regenerate Image as shown in your example.

    This is on WP 3.0.1. I tried deactivating/reinstalling and still can’t get that option.

    I debated whether I should try regenerating all my images but I have over 10,000 and I have a feeling that would be a bad idea. Thanks!

  25. I’ve installed the plugin but it appears to stop 0% for any image I try to regenerate. This happens with individual images as well as when I try to do them all in one go.

    Any ideas what may be causing it?

    Matt.

  26. Ahhh I never knew you could do that with Firebug, here is the message:


    Warning: set_time_limit() has been disabled for security reasons in /home/fhlinux010/p/website.com/user/htdocs/wp/wp-content/plugins/regenerate-thumbnails/regenerate-thumbnails.php on line 342
    {“success”:”"IMG_9126" (ID 304) was successfully resized in 6.885 seconds.”}”

    Hmmm that’s strange, just tried a few now and the bar seems to go to 100% instead of just sticking at 0. Still, it is saying that the regeneration has failed.

    • Your host has disabled my plugin allowing PHP scripts to run for longer than normal amounts of time (image regeneration can take a while, so I play it safe). As a result, an error message is thrown when I try to use that function and that makes the Javascript not be able to understand the result of the AJAX which it interprets as a failure.

      I’ll update my plugin to silence the error message. ๐Ÿ™‚

  27. Ahhh okay thanks ๐Ÿ™‚

    Might this be the same issue that is causing some images to stay at 0%? I know if I try to update all in one go it stays at 0% the whole time.

  28. Pingback: Worries with Wordpress: Image Resampling | Meeque.de

  29. Hi there,

    Users with Editor role get the following error when trying to regenerate individual thumbnails from within Media Library.

    I’m using WordPress Version 3.0.3 and version 2.1.3 of your plugin and the same method works perfectly for an admin user.

    Any ideas?

  30. Hello, if you want the plugin to also add the thumbs as featured images just insert this line

    update_post_meta($image->post_parent, '_thumbnail_id', $image->ID);

    after

    wp_update_attachment_metadata( $image->ID, $metadata );

    I haven’t tested it much, but seems to work ok.

  31. Pingback: ???????WordPress???? | ????

  32. Alex,

    Great plugin, very useful for all of these featured image themes we are seeing these days. We have run into an issue on a site that we just migrated to a new server. On the old server, the plugin works great, on the new server, the progress bar hangs at 0%. I tried manually uploading the thumbnails from the old server and then running the plugin, still hangs at 0%. I also tried running the plugin from the media page on an individual file, with the thumbnails from the old server in place, this works and the thumbnail appears correctly in the layout. We are running Regen. Thumbnails 2.1.3 and WordPress 3.0.4 with Multi-Site enabled. Here are the error codes we are seeing:

    Firebug Ajax Error:
    response is null
    [Break On This Error] if ( response.success ) {

    Server Side PHP Error:
    [error] [client 108.73.136.50] PHP Fatal error: Call to undefined method Services_JSON::encodeUnsafe() in /var/www/html/wordpress/wp-includes/compat.php on line 136, referer: http://accesslocal.tv/wp-admin/tools.php?page=regenerate-thumbnails

    We have installed the GD Library on the server side. Any ideas on what to try next would be greatly appreciated. Thanks!

  33. Pingback: 70 Plugins Wordpress – Belles ร  bloguer | Hello, Architekt !

      • Hi!

        Sorry, but the plugin doesn’t regenerate the rest of the sizes, only thumbnails ๐Ÿ™ Try it on the last version of WordPress!

        Anyway, you’ve done a great work with your plugin!

        Thanks,

        Chris.

  34. Thanks for the great plugin! I am trying to integrate it into the WordPress post/page edit screens in the admin so that users can regenerate a thumbnail after they edit it. Do you (or anyone) have any suggestions about the best way to do that? Thanks very much.

Comments are closed.