ajax-thumbnail-rebuildThis Wordpress plugin allows you to rebuild all thumbnails on your site. There are already some plugins available for this, but they have one thing in common: All thumbnails are rebuilt in a single step. This works fine when you don’t have that many photos on your site. When you have a lot of full-size photos, the script on the server side takes a long time to run. Unfortunately the time a script is allowed to run is limited, which sets an upper limit to the number of thumbnails you can regenerate. This number depends on the server configuration and the computing power your server has available. When you get over this limit, you won’t be able to rebuild your thumbnails.

Why would you want to rebuild your thumbnails? Wordpress allows you to change the size of thumbnails. This way, you can make the size of thumbnails fit the design of your website. When you change the size to fit for a new theme, all future photos you are going to upload will have this new size. Your old thumbnails won’t be resized. That’s where this plugin comes into action. After changing the image sizes, you can rebuild all thumbnails. But instead of telling the server to recreate all thumbnails at once, they are rebuilt one after another. Rebuilding thumbnails for one photo won’t take all too long, so you won’t run into any script timeouts. Note that you still have to wait until all thumbnails have been rebuilt. If you close the page before the task is completed, you have to start all over again.

Download the plugin here.

This plugin requires JavaScript to be enabled.

15 responses


Do you want to comment?

Comments RSS and TrackBack Identifier URI ?





Hello!

This is a great and very useful script!
As wp files imported from server if not auto generate thumbnails then no way it does.
So this is a working idea.

In my case, i dont know why, the thumbnails do not appear while generating, and sometimes it stops.
this is more than 900 pictures i want to re-thumble, so this is a hard lesson.

Anyway it is a great plug but sometimes needs restart as i expected. Dunno why, just stops, not about script limit. it is random, after 201, after 74, after 360.
Maybe there should be a resume option, but i can imagine it is hard to code..
Or maybe a selection to regenerate based on Directories.

Thankyou for your time and knowledge!
Have a nice one!

October 18, 2009 1:28 pm

Excellent plugin, regenerates all intermediate sizes as well as thumbnails, just what I needed.

October 25, 2009 8:01 pm

Thanks for making this, saved me a lot of trouble. worked like a charm. gracias

November 8, 2009 6:11 pm

Does this not work for recreating the thumbnails for galleries?

I have one site where the galleries are just scaling down the full site images. These thumbnail plugins seemed to remove the path to the old thumbnails and not give a path to any newly generated ones?

Logging into ftp doesn’t seem to show anything new in there either?

November 18, 2009 1:01 pm

@John: As far as I know, galleries should show images with the “thumbnail” size, not the original file. What sizes have you set for thumbnails under “Settings -> Media”? Do you have any plugins installed which change the behavior of the gallery?

November 18, 2009 8:48 pm

Thanks for the quick reply.

Originally it was 150. I switched to a cropped 170×95 when I changed my theme.

The only plugins I have really that deal with images are Lightbox 2 and Administer. I disabled both and no change to the galleries.

When I Right click my gallery image dimensions I see:
1024px × 573px (scaled to 170px × 95px)

Obviously this is hogging bandwidth. Your plugin at least pretends like its working, but I can not find the rebuilt images anywhere?

P.S. You might consider the subscribe to comments plugin :)

November 18, 2009 11:40 pm

@John: I took a look at the wordpress code, and I couldn’t find anything that explains the behavior you describe. But I found a post in the forum on wordpress.org about a (different) plugin to rebuild thumbnails which experienced the same problem (http://wordpress.org/support/topic/223534). This plugin uses the same function to rebuild the thumbnails. It seems like the cause for this problem has been a configuration problem. The hints are a little vague, but I hope this is helpful for you.

Regarding the subscribe to comments plugin: Great idea! :)

November 19, 2009 12:26 am

I’ll check that out. Maybe it something in the orginal theme I selected. It’s heavily modifed since then, so I’m kind of stuck with it.

I see you added it :) I’ll subscribe so I can close this browser window finally.

Thank you for your time!

November 19, 2009 1:14 am


Simply Super plug-in!

A true time-saver!

Many many thanks to the author. Keep up the good work!

PS. To ones having issues – be sure to increase your memory limit in root/wp-settings.php

Dian.

January 22, 2010 11:59 pm


Comment now!