Regenerate Thumbnails

Hi there. May I suggest using Jetpack’s Photon module instead of this plugin? Photon will use WordPress.com’s servers to generate thumbnail images for you on-demand in whatever size is needed. This means that you don’t need to use my plugin to generate new thumbnail images when you switch themes, change thumbnail sizes, or anything else!

Don’t want to use Jetpack? That’s okay too. My plugin still works just fine.

Plugin Description:

Regenerate Thumbnails allows you to regenerate the thumbnails for all of your image attachments. This is very handy if you’ve changed any of your thumbnail dimensions (via Settings → Media) or switched to a new theme with different featured image sizes after previously uploading images.

Download:

Screenshots:

731 thoughts on “Regenerate Thumbnails

  1. Pingback: Regenerate Thumbnails - plugin per Wordpress - Attic22

  2. I have a very weird situation going on with my blog, image wise.

    I just recently changed the domain name and updated everything per wordpress codex. Anyways, all images I upload after the name switch shows the [gallery] fine, but all the old post wit the [gallery] prior to the name switch is showing the full size image instead of thumbnails.

    The thumbnail image does exist on the server and it even shows in the db.

    Would this plugin of yours re-link it or whatever if I just use the same dimensions? Technically shouldn’t it just overwrite the existing files?

  3. My plugin uses built in WordPress functions to handle everything. All it does is force a thumbnail/meta rebuild, as if you just uploaded the image.

    No idea if it’d fix your issue or not. Can’t hurt, but I can’t remember if it’ll skip existing thumbnails or not.

  4. Viper007Bond on April 2nd, 2009 at 11:00 PM wrote:

    My plugin uses built in WordPress functions to handle everything. All it does is force a thumbnail/meta rebuild, as if you just uploaded the image.

    No idea if it’d fix your issue or not. Can’t hurt, but I can’t remember if it’ll skip existing thumbnails or not.

    Cool, I guess my next question will be… will it regenerate in the same date/folder structure?

    Let’s say i’m recreating for a post in 2008/09. Will it create the thumb in wp-content/uploads/2008/09/image-115×115.jpg?

  5. Pingback: WordPress Regenerate Thumbnail Plugin | Bookmarks

  6. Just discovered where in 2.8 the regenerate thumbnails plugin appears “Tools > Regenerate Thumbnails”. Which is great, but I’ve just done an upgrade of a wordpress website from 2.5 to 2.8 and the plugin doesn’t recognise any of the existing attachments. So it doesn’t regenerate anything. Any help would be greatly appreciated.

    Benji

  7. @Benji, WordPress 2.5 didn’t use the same attachment method. The images were imbeded not attached.
    Solution= none automatic, manual attach, re upload.

    unless someone has created an amazing fix my attachments script.

  8. twincascos on July 2nd, 2009 at 12:21 AM wrote:

    @Benji, WordPress 2.5 didn’t use the same attachment method. The images were imbeded not attached.
    Solution= none automatic, manual attach, re upload.

    unless someone has created an amazing fix my attachments script.

    Thanks for that. It turns out that the main difference between 2.5 and 2.7 or later is in the metadata table of the each attachment the URL is absolute as opposed to being relative to the root of the uploads directory. So I managed to fix it by finding and replacing all the absolute paths in the metadata table and then run Regenerate Thumbnails. Now they’re all reprocessed and in the right sizes. Few! Awesomeness ensues. Thanks heaps though.

  9. That’s great, I was thinking pre 2.5, don’t you love change…
    maybe regenerate thumbs plugin could check if the metadata is absolute or relative, and offer to change/ upgrade the entries…

  10. I’m using godaddy as my webhost and they must be putting some kind of time limit on scripts because I only get slightly past the first image and it stops. I tried copying Cedric’s Quick n Dirty patch, but it didn’t seem to work, something must have changed in 1.1 that caused the patch not to work, or at least not as-is. If anybody knows of a way to make that patch work, it would be greatly appreciated.

  11. Also, I’ve got a script that will update your old 2.5 gallery items to the new type paths, but not in plugin form. I don’t really have time to make it into a plugin, but if there’s a plugin author that wants it, let me know, maybe it will save somebody some work.

  12. Josh on July 14th, 2009 at 8:12 PM wrote:

    Also, I’ve got a script that will update your old 2.5 gallery items to the new type paths, but not in plugin form. I don’t really have time to make it into a plugin, but if there’s a plugin author that wants it, let me know, maybe it will save somebody some work.

    Oh, I would LOVE that script is you make it publicly available.

  13. After running this plugin, you’ll need to change the values in the database too.

    This script will change the thumbnail sizes. PLEASE MAKE SURE YOU MAKE A BACKUP OF wp_postmeta FIRST.


    UPDATE wp_postmeta
    SET meta_value=replace(replace(meta_value,'150x150','145x110'),'s:5:"width";s:3:"150";s:6:"height";s:3:"150"','s:5:"width";s:3:"145";s:6:"height";s:3:"110"')
    WHERE (meta_key="_wp_attachment_metadata") AND (instr(meta_value,'150x150')>0)

    Replace 145 with the width you require, and 110 with the height in both places.
    Replace the 150 values with whatever your original thumbnail sizes were.

    (tested on version 2.8.3)

  14. The first time I used this plugin it worked great. I first edited media.php to crop my thumbnails from the top and the left. Then I ran the plugin.

    After that, I added some posts and noticed that the thumbs were being cropped from the center (possibly due to Thumbnails for Excerpts plugin I now suspect.)

    So, I ran Regenerate Thumbnails again, and the script timed out. Don’t know why since Yahoo says that it allows PHP scripts to run for 100 seconds. It quit after maybe 20. On top of that, the change I made to media.php was gone somehow and I don’t know what happened but,

    I have about 1/4 of my thumbnails are showing up up correctly (cropped from the top and the left) and the rest are cropped from the center.

    I don’t know how to get the patch listed above. I pasted it into the plugin PHP file right above the one (I think) existing reference to flush. I saved and got a fatal error from WP. I deleted what I pasted in and it’s back to the original state.

    Still times out after about 20 seconds and I have the same 1/4 of my thumbs showing up OK and the rest cropped from the center. Tried running from Safari and Firefox (Mac). Would using Windows help or is this a server-only thing? I didn’t think there was a problem.. It ran fine the first time. Should I contact my host (Yahoo?)

    Does anyone know if there is going to be an updated release of this plugin available?

    Thanks!

  15. Pingback: ???????????????? » Blog Archive » ?? WordPress ? Gallery ??

  16. Pingback: res4WP | WordPress Plugins: Viper007Bond.com: Regenerate Thumbnails plugin

  17. Pingback: Plugins WordPress 01-11-2009

  18. For me the plugin never makes it past 45% or so. I’ve left it alone all day several times and it never gets past there. I really need my thumbnails regenerated.
    Suggestions?

Leave a Reply