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. Hello!
    If someone would like to upgrade your plugin automaticly it says that it couldnt be found .. coz the link is wrong (broken):
    Frissítés letöltése innét(“Downloading upgrade” in hungarian:): (http://downloads.wordpress.org/plugin/regenerate-thumbnails.2.0.2.zip).
    Sikertelen letöltés(“download failed in hungarian”). Not Found
    instead of
    http://downloads.wordpress.org/plugin/regenerate-thumbnails.zip
    ..You should create at least a symlink to it or use a name format that follows the change of versions..

  2. This plugin is great! I use the set_post_thumbnail_size() in functions.php to set the new size and then I run the plugin to regenerate all the thumbs. This safes me a lot of time and now I can quickly change thumbs in the future. Thank you very much!

  3. Hi !
    Thanks a lot for this plugin, which is really useful for thumbnails. But I’d like to use it for updating the large size of all the pictures of my blog.
    I expanded my blog theme, so I would like to show larger pictures than before (800px > 950 px). I changed the large size setting in WordPress, but I can’t see any change on the posts. So I guess I should run something like Regenerate Thumbnails, but for the large setting.
    Could you tell me if this plugin could be useful for what I need ? And if it is, how should I procede ?
    Thanks !
    Nicolas

    • That’s because the img tags in your posts have the width/height/image URL hard coded into them.

      I actually wrote some code just a couple of days ago that replaces img tags with the updated version (I changed the width of my theme and ran into the same issue) and I plan on including the code in this plugin in the future. I’m just too busy right now to do it. 🙁

  4. Looking forward to get more update on this plugin to include changes for all settings in image size.

    Also is there a recommendation of a plugin which can automatically generate post thumbnails for posts.

    Regards,
    Ashish

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

  6. Hey, I just ran this on my site and now all the photos in my galleries show up at full size rather than the thumbnails. Yikes! Check out http://www.motorcyclemojo.com/2010/03/riding-arizona/
    When I go into the image uploader and look at the photo information, all of the alternate image sizes (thumbnail, medium, large) are grayed out with only “Full size (0 x 0)” available. When I look at the directory on the server, the thumbnails are there. Somehow the link from the full size to the thumbnail have been removed. Any thoughts? Thanks.

  7. GD is installed and working well. I just tested, I can upload new images and they resize normally. Something I noticed, the original thumbnail files on the server aren’t being updated (ie: still the old file dates). So, somehow the attachment information was updated but the images weren’t updated. I’m not sure what to do at this point.

  8. Viper007Bond, don’t worry about it. I have realized that a SQL change I made earlier today has borked my site and Regenerate had nothing to do with it… it just brought the error front and center. I am restoring from a backup. Please feel free to delete my posts since they end up having nothing to do with your plugin, just a co-incidence. Thanks!

  9. Will your plugin follow my theme’s functions.php settings for additional thumbnail sizes (or does it only follow WordPress –> Settings –> Media). For instance, if I add the following to my functions.php, will your plugin create a thumbnail based on those settings.

    add_image_size( ‘other-thumbnail’, 200, 200, true ); // other thumbnail size

    Basically, I forgot to create a thumbnail size and already uploaded all the images. Please let me know if this will work. Thank you.

      • Hi, I’ve installed and run your plugin but the thumbnails of my blog are still the same size, i’ve tried several times, changing size in Media setting. Nothing was changed. I use the last updated versionb of wordpress and I have around 400 pictures.. is there something else I can try?

  10. I am trying to run this plugin but I just get an error message saying:

    Unable to find any images. Are you sure some exist?

    Any ideas why it’s not finding images? They are stored in my uploads dir..

    Thanks!

    • My plugin only resizes attachments, i.e. those that have been uploaded after… WordPress 2.5 I think it was. Before then, details about the uploaded file weren’t stored in the database.

  11. I installed the plugin on one WP site (out of 7 hosted together) which was having problems, all of the others were working fine and do not have your plugin. However now none of the 7 sites are showing thumbnails!?

    How on earth can that be? It seems a bit coincidental that this happened after istalling regen.thumb but I’m confused as all blogs are seperate WP installs with seperate databases?!$%

    Any ideas would be grateful!

  12. I get an 500 Internal Server Error.

    Source: action=regeneratethumbnail&id=32

    It works with action=regeneratethumbnail&id=31 and others.

    Maybe you need to catch those errors to continue the execution of the script.

  13. Pingback: Regenerate Thumbnails v2.0.0 « Viper007Bond.com

  14. First off, thanks for the plugin. I am migrating a very mature site and so the plugin is being asked to handle a lot. I am seeing the same issue as Ali. Stall out every time at 65%. Same sort of thing in firebug. If you have decided it’s a bug, is there a patch release forthcoming?

  15. FTR, the plugin is not compatible with newest jQuery version (1.4.2 at the moment of writing) I deregistered WP bundled jQuery and registered newest script. When regenerating thumbnails nothing happened…

  16. Pingback: Blog What I Made » Week Notes Week 93

  17. Hi Viper,

    Big fan of this plugin. Quick question. Is there a way of calling it (perhaps via functions.php and a hook) to automatically generate a thumbnail when a post is saved?

    Thanks again for this great plugin!

    • To regenerate all images attached to a post, but only when the post is saved? Such code could be written, but no, my plugin cannot do that as-is. There’s no pluggable function really.

  18. Pingback: Plugins de Wordpress usados no blog | Comunidade Pesbrasil

  19. Pingback: WordPress/CSS help

  20. Pingback: ??? ???????? ? ???? ????????? ???????? | ?????? ???????? ??????? Wordpress | n-wp.ru

  21. one of the best option ever, missing in default WP, ya just make my day !
    billions thanks ! great work, sincerely :]

  22. I have a wordpress install where it simply doesn’t works.
    When I click to regenerate thumbnails it goes to the other page but I get no loading bar and nothing happens.
    It’s WordPress 3.0 RC3 and PHP 5.2.3, GD is installed and working.
    I tried disabling all plugins but no success.

    I have another install of wp 3.0 RC3 with PHP 5.2.12 where it works without problems.

    I just don’t know why it’s not working.

  23. Know what would make this plugin really cook? Some instructions on how to run it.

    I installed it, activated it, then went through every friggin’ WordPress 3.0 menu in the dashboard and can’t see a single thing added that allows me to update the thumbnails. No buttons, no text, nuffin. Zip. Zilch. Nada. Bupkis.

    • I second that. I have no clue what to do after activating it. Maybe put the instructions on top of your page and/or in the text next to the plugin. HOW DO I MAKE IT START????

  24. I don’t have the function js_escape() in my system. RHEL 4, with PHP 5.1.6

    I had to remove this for the plugin to work.

    Once it worked, it ran like a dream. Any replacement solution for this?

  25. Just for you to know that I solved my problem by replacing js_escape() with esc_js(), as mentioned above.

    Now everything works like a charm!

    Thanks Jim Isaacs for pointing the problem.

  26. I’d love to see a feature added: a checkbox to generate only missing images… Right now I’m using it to update missing images, and chugging through ~2000 images is superslow just to update the 100 or so missing. That said, this plugin is a saviour!

  27. Hi, I discovered I had some problems with the plugin because I had WP DEBUG enabled on my wp-config.php and wordpress returns error messages for deprecated functions when the debuger is enabled.

    So replacing js_escape() with esc_js() solved the problem since it’s not using a deprecated function anymore.

    Disabling WP DEBUG would also work.

  28. wow ,you have so many nice plugins ,all of em are really so cool n simple to use.I had never thought that I could resize all of my images at one go and that too with so much ease.
    Thnx a lot for helping us for redesign our blog

  29. Hi there, ever since the word press 3.0 upgrade I cannot get this plugin to work for my Arras theme. It’s always worked perfectly, but now just freezes at 24%. And yes, I have upgraded to the latest version of the program.
    Any help would be appreciated!

    Thank you

    • If it’s freezing, then an image resize is likely failing which is preventing it from continuing. I need to take some time to tweak it so that it doesn’t completely break the whole process when a single image times out (too large of an image file or whatnot).

  30. Viper,
    Thanks for the response. I figured that might be the cause. Its a GREAT plugin, thank you for making it available. I am looking forward to that update. 😉

    Have a great weekend!

    Damian

  31. Hi there,
    I installed and activated your plug in but I do not see an option anywhere to actually run it. Please help!

  32. I ran the Regen and it appears to have broken most of my thumbs. They are simply gone when looking at Media-Library. 127 images. I changed the Thumb size and re-ran the plugin with the same result. Any ideas.

    • That’s weird. I’m using the built-in functionality. Do the new files exist in your uploads folder?

      BTW, to “undo” this, just change your media settings back to what they were before and re-run the plugin.

  33. I created a New post yesterday and uploaded an image from my hard drive and poof…no thumbnail. I go Media Gallery and the majority of the entries did not show a Thumb. I make adjustments to the size and re-ran the process with no success.

      • The other way the problem presents itself is….after running Regen Thumbs…when I look at Admin-Media-Library there are no Thumbs presented. Just the placeholder alongside the entry. If I choose to Edit an image followed by “Edit Image” I am presented with the actual image but there is nothing in the Current Thumbnail box. I feel like this plugin nuked my Thumbs completely out of existence. (It appears that only 10% of my thumbs survived this process.)

  34. Thanks a lot for this plugin, I erased by accident a folder with images used in many galleries and your work spared me to recreate all the thumbs by hand.

  35. Hello there,
    I was trying to use your plugin, but it always stops completely at some point (sometimes 24%, others 72%, etc). Is there something I could do to find out which image is the problem?

    • I didn’t try but in the regenerate-thumbnails.php file there’s a javascript function called RegenThumb that take the id of the image to resize as input; if you print it, since the function is called for each image you will know the latest working image; if you also print the $ids array you will have the list of all the images ids so the id in the list after the last working one should correspond to your broken image. It’s just a guess, good luck.

  36. Hi Viper,

    I was using your awesome plugin and in theory it should be working like a charm, but in my case it says that all the thumbs are generated successfully but in fact, it didn’t do a thing!

    I was going from 150×150 to 300X168; All the essential php modules are loaded; permissions are OK;

    I tried all sorts of test cases, but if the plugin returns a success it’s so hard to know where to start looking! Ajax requests are returning ‘-1’.

    Any Advice? Thanks in advance!

    Arjen, The Netherlands

  37. Hello Viper,

    I have been referred to you by SoZo, a senior moderator at StudioPress.

    I will be adding a few new image sizes to the functions.php file of my StudioPress theme which runs under their Genesis framework.

    My question is .. If I:

    1 – add the new sizes to the php file (2 new sizes + the original size, so 3 in total)
    Original thumbnail size is 150 x 150 – new ones will be 100 x 100 and 70 x 70
    2 – run Regenerate

    Will it generate the 2 new sizes and leave the original intact?

    Thanks and cheers,

    Gil

  38. Oke i found out that it has to do with the filepath in the database

    some entries look like this

    /home/.deceleration/arkl/mywebsite.com/wp-content/uploads/2009/06/an_Image.jpg

    and some like this

    2010/08/an_Image.jpg

    so in both cases the plugin thinks these files do not exist!

  39. Hi,

    The plugin appears to work, but am I correct in saying that if I want to resize images which are already inserted into posts I have to re-insert them after running the plugin? Or should this (i.e. amending the dimensions in the actual html tags) be happening automatically ?

    Thanks.

    • Sadly yes. The width and heights are hard-coded into the HTML in the post.

      I have a newer version of this plugin sitting on my computer that actually goes through all posts and fixes this, but I’m not quite happy with the code in it’s current state and I want to rework it some more before I release it. Unfortunately I’ve had little free time lately.

  40. Pingback: Regenerate Thumbnails Plugin - Creativille

  41. Hi-
    I have tried to run Regenerate Thumbnails (awesome pluging, btw, and many thanks!) but it keeps getting hung up at 4%. I ran Firebug but it’s not detecting anything.
    I let the plugin run overnight and the next morning, it was still at 4%. I have 175 posts and about 300+ images.
    Any idea what I can do?
    Many thanks,
    C

Comments are closed.