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. Hi and thanks for this great plug-in! I have just one question: after regenerating thumbnails, does it also remove “old” thumbs? We have a site with MANY images and we don’t want to waste HDD space (and also manually searching and deleting redundant thumbs).
    Thanks much!

  2. HI

    Im try to use your plugin. But I need make some changes.

    I need send the thumb picture to Amazon S3 service!

    Can you give me a clue about how can modify your plugin to reach my goal.

    Thanks, Nicolas

  3. hi! I stumbled across your plugin because my theme uses timthumb which automatically makes different sizes of my images and does some pretty bad cropping in the process. Does your plugin override timthumb? For example, the featured image in each blog post is displayed in the blog roll page with some terrible cropped versions . I am hoping your plug in will allow me to manually make each version? thanks!

    • My plugin doesn’t implement any custom functionality. You should be using the core WordPress functionality to display images.

      My plugin simply makes sure that thumbnail files exist for all thumbnail sizes that you have registered with WordPress via your theme and/or plugins, i.e. via set_post_thumbnail_size() and add_image_size(). Since WordPress only creates thumbnails on upload (unlike TimThumb which makes them on-demand), my plugin allows you to create thumbnails for old uploads after changing your thumbnail sizes.

  4. Hi Alex,

    when I regenerate the thumbnails, does the name of the picture change. For example now my picture is named “src=”…/uploads/2012/08/image-picture-200×300.jpg. When I regenerate for example to 300×450 px is the picture now named … picture-300×450 and do I therefore need to change all my posts where I included pictures manually? Or are the old pictures kept in the uploads folder anyway?

    Thanks and best regards
    Sven

    • The thumbnail filename always references its size — it never lies. For example image-picture-200×300.jpg is never going to be 300 x 450 pixels.

      However no thumbnail files will be deleted so your old posts will continue to work fine. However they will keep referencing the old sized thumbnail images because those sizes are hard-coded. Only things like galleries and post thumbnails will start referencing the new sizes.

      I’ve thought about introducing functionality to my plugin that will loop through all posts and update the HTML but it’s not a simple process. It’s still on the drawing board though and I hope to eventually add such functionality.

  5. hello alex!
    I tried to use your very useful plugin but unfortunately its not working on my site. what am I doing wrong?
    was changing the image size in Settings – Media and Woocommerce, but catalog-images are still the same size….

    thank you for your help!

    greetings
    steffi

  6. Pingback: 100 PLUGIN WORDPRESS BERMANFAAT - ISP INTERNET | ISP INTERNET

  7. Pingback: 5 Simple WordPress Plugins | Writer's Block Admin Services

  8. Pingback: 100 WordPress pluginova za vaš sajt | Tehnologija.me

  9. Okay, so I installed the plugin after I added a new image size for a custom post type. When running it, though, all the plugin does, is delete all sizes except the original image. There are no error messages, it claims success, but it just deletes all my generated image sizes.

  10. I was regenerating images no problem when I started getting the jQuery bug message:
    function (){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}.
    So I checked the AJAX response in Firebug and it showed this:

    Warning: getimagesize(/wp-content/uploads/2013/01/image-600×600.png) [function.getimagesize]: failed to open stream: No such file or directory in /wp-content/plugins/simple-image-watermark/simple-image-watermark.php on line 267

    The weird thing is the image was uploaded in December of 2012 so the file path is
    /wp-content/uploads/2012/12/image-600×600.png
    NOT
    /wp-content/uploads/2013/01/image-600×600.png

    Everything uploaded in January 2013 worked but any other month gave me the same error.

    Why isn’t it looking in the correct folder? Is there a workaround?

    I would greatly appreciate any help!

  11. Pingback: TOP 100 PLUGIN WORDPRESS TERBAIK « norynazis

  12. Pingback: 100????Wordpress?? | MD Blog

  13. Pingback: Wordpress Update (3.5.1) – February 13th – Columbia Blogs

  14. Hi !
    One of my customer simply replace his image in the FTP, and update his article (the article contains charts).
    So, i have to re-generate the image every time the post will be save in case the image was FTP updated.

    Could i do that with the action “wp_ajax_regeneratethumbnail” (i know how to recover the ID of the image – and i could call the action in a foreach) ? Is the function was made for ?

    Thank you !

    • General advice: With WordPress the customer should not be able to “mess around” with FTP as this can corrupt also a lot of metadata in database.

  15. Thanks for making this! Sorry you have to answer all these stupid questions, but you’re a good person for doing so anyway.

  16. Thanks for this great plugin! Just one quick question to make sure I understand right: If I change the “full-size” dimension of my pictures and run your plugin, will this also affect images I inserted via the “caption”/insert media butoon? I guess not (as least it doesn’t do it in my case ….)
    Do you know of any script solution to this? I guess it affects pretty much anyone who ever changes their theme ….

    THX!

  17. Hey…I’m getting errors where it can’t find the images with a pathname of this:

    “sanctuary-1” (ID 8032) failed to resize. The error message was: The originally uploaded image file cannot be found at /nfs/c02/h04/mnt/43539/domains/popcritics.com/html/wp-content/uploads/2008/10/sanctuary-1.jpg

    I can see the image in my media section…and when I click the little “regen” link next to it, I get this error.

    Any ideas why it’s looking where it is?

    • Could it be because I’m playing on a test server right now with my hosts file changed? Maybe this plugin is actually looking up the image location on the server that’s live right now?

      • Yes, that’s exactly why. When you upload an image and the attachment entry is created, WordPress stores the full path to the image file. My plugin uses this path, supplied by WordPress, when doing the resizing.

        I’m not sure why WordPress stores the full path instead of just the relative path. Seems silly.

  18. Pingback: Naudingi WordPress ?skiepiai | Apsai.ltApsai.lt

  19. Any thoughts about how to make this work with the various Amazon S3 plugins out there? My thumbs no longer exist on my local machine, so either I need to somehow mount my S3 bucket onto my local machine, or I need to modify the plugin to know how to read/write to S3 or interact with the plugins.

    Any thoughts? 🙂

    Thanks!

    • The thumbnails don’t need to exist locally, only the originals do. But assuming that’s what you meant, then figuring out how to mount the S3 bucket would be the best solution. This plugin uses core WordPress functionality to generate the thumbnails (it just calls the same functions that are called on upload). That’s assuming the S3 plugin you’re using hasn’t filtered those functions to generate the thumbnails remotely.

      Regardless, I’m afraid you’re on your own for this one. Sorry. 🙂

  20. Pingback: Sidebars / Widgets / Menus... | hank is me

  21. Pingback: Daftar Koleksi 100 Plugins WordPress Terbaik untuk Website Anda | "art of life"

  22. Hi, I have just used your program but for some reason all my images are blurry. Any ideas on how to fix this ? Thanks, James.

  23. Do I have to leave this activated after successfully regenerating my thumbnails? Or is it ok to deactivate and/or delete this (great!) plugin now that everything’s done?

  24. Hi, once more one of these questions – “why doesn’t it work on my installation?”
    Well I moved my blog to a new machine and did set up wp entirerly new. Befor the
    the thumbs were stored in the wp-contents upload file. Now they don’t appear anywhere.
    Unfortuately I the over all process lookes good. I can’t find any error messages.
    And I can’t coose a differnt size when posting pictures.

    Do you have any suggestions? Thanks

    • Ok I could fix it, I didn’t had all apache modules. But anyway the the plugin didn’t throw any warning about this, but sait something like “success – no failure”. Any way – many thanks for the plug in!

  25. Pingback: What would Adventure Paul do?

  26. Can’t get this to work right on a wordpress install for some reason. It works with the same theme same code on another install on a different server but on this one it runs through the “Create Thumbnail Process” but never creates any thumbnails on the server. This appears to be a conflict with something within the server but I have no idea what it is conflicting with.

    What would be stopping the writing of thumbnails but not showing up an error. It looks like a similar problem to marek…

    any ideas why this would happen?

  27. Pingback: Looking for a WordPress Subscription Plugin? You Likely Need Several - Andy Sozot

  28. I can’t seem to be able to regenerate my files, it keeps giving me errors such as “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”

  29. Hi,
    i used your plugin, but instead of selecting one plugin I had all my thumbnails images resized. Now the one I wanted to re size looks great but the rest looks much worth than before. Tried to delete the plugin and re uploading the images but it’s still the same.
    Any idea how I could reverse the process? Let me know, thanks!

  30. Used this on the “Nexus” theme and it totally destroyed the way my website looks. Resized TONS of images and this was recommended to be used by woocommerce when resizing product thumbnails… any way to revert the changes?

  31. Pingback: Adaptar imagenes al nuevo theme

  32. Hello,
    After changing the WordPress URL and Site URL under General Settings, I received the following error when attempting to regenerate thumbnails:

    function (){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i===”function”?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!==”string”&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this}

    When I revert the URL’s back, it is successful. I need to keep the new URL values, so any ideas on on how to prevent the error from occurring for future regeneration without having to switch the URLs?

    Thanks.

    • Errors like that happen when the AJAX endpoint returns an invalid response. I thought I fixed that by checking to make sure the response was valid before trying to use it.

      Do you know how to use your browser’s developer tools to inspect the AJAX request to see what the response’s body is?

      • I’ve used Firebug to inspect HTML elements, but have not used any tools to dissect AJAX issues. Can you point me in the right direction so I can get the info out to you?

        • I haven’t used Firebug in years but here’s how to do it using Firefox’s built-in tools:

          • Control + Shift + K to open the Web Console (also available at Tools -> Developer Tools -> Web Console).
          • Make sure Net -> Log is checked.
          • Right-click the white pane area and check “Log Request and Response Bodies” so you can see the sent and received data.
          • Run a resize. Click on a row that’s loading /wp-admin/admin-ajax.php and scroll down to “Response Body”.
          • Email me the full body.

          Thanks for the help.

  33. Hi,
    I used this plugin on advice from a blog that suggested a way to sharpen images in WooCommerce. That didn’t work, product images are still fuzzy. In addition, the magnifier no longer works, even if I replace the images with newly uploaded bigger sizes.
    Does the plugin continue to resize images after I have run it once? Should I deactivate it before trying again?
    URL: http://50.97.96.80/~jbradmn/product/kickport/
    Thanks in advance.

  34. Pingback: WordPress plugins die je áltijd nodig hebt! - Jannes & Mannes blog

  35. Hi There,
    I have install the plugin and run it. unfortunately it has not fixed the image blur issue on my featured products slider. See http://www.kingsbanners.com/wp.

    I have installed this on another website of mine (using the same theme) and it fixed the blurry featured products image (thank you).

    Any ideas, or other things I can try?

    Cheers

  36. Dear Sir :

    Yes, I shall say thank you for this sweet plugin , I apply this for years and works very well. Thank you again for the help and wish you a goo day!

  37. Dear Alex,

    I am using wp 3.5.2, when i try to regenerate thumbnails, some images are fail to resize, some are ok, their size are less than 1M, like:””fyyintv” (ID 561) failed to resize. The error message was: Unknown failure reason.” could you tell me how to fix this, Thank you!

  38. Hi, does this plug-in not work for all authors. It only seems to be visible to WP admins and not to Editors or Authors of posts.

  39. You really need a check to see if the thumbnail has already been regenerated. For people on shared servers your tool times out. However, if you’re able to upload the images from say a test server, then the only thing your tool needs to do is check the presence of an existing image, and if the resized image exists, just update the database. At least an option to only update the database with the existing resize images.

    • This would not be easily possible without duplicating large portions of the existing WordPress thumbnailing code and I’d rather stick to the existing API so that there are less bugs in the code.

      Also it should never time out because the resizing of each image is handled by a separate PHP process per image, as if you were uploading a brand new image to your site. If that is timing out, then you have bigger issues to worry about.

      • Timing may be an incorrect statement, but whatever this is function () {if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i===”function”?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!==”string”&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this;} this is what it does on some images. Have no issues on the test server.

        • From my debugging in the past, that happens when the AJAX request returns a PHP error, such as running out of memory. I’ve done my best to stop that (turning off PHP error messages, doing error checking in the Javascript, etc.) but it’s a pesky little bug that refuses to go away.

          If you know how, can you use your browser’s developer tools to see what the AJAX response is?

Comments are closed.