WordPress.org

Ready to get started?Download WordPress

Forums

Regenerate Thumbnails
CPU usage (6 posts)

  1. Dev93
    Member
    Posted 3 years ago #

    Hi there,

    I have been having some CPU usage issues with my host server from using a theme that has TimThumb, creates thumbnails on the fly.

    I want to know how Regenerate Thumbnails works. Right now I have to work around TimThumb with 'set featured images' but it is not a perfect fix.

    I am hoping this one might. Any help is really appreciated.
    devin

  2. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 3 years ago #

    When you upload an image to WordPress using the built-in uploader, thumbnail files are created in the upload directory at the sizes specified at Settings -> Media as well as any custom sizes defined in your theme (if it does this).

    If you change the dimensions at Settings -> Media or add a new custom thumbnail size (via theme switch or theme editing), you can use Regenerate Thumbnails to go through and re-thumbnail all of your uploaded images.

    It'll cause a lot of CPU usage obviously, but it's only a one-time process.

  3. Dev93
    Member
    Posted 3 years ago #

    Thanks Alex,

    I will try playing with it on a smaller site first.

    Best,
    devin

  4. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 3 years ago #

    I'm not 100% sure it skips thumbnails if they already exist at the correct size. I need to tweak this plugin a bit. :)

  5. pantsonhead
    Member
    Posted 3 years ago #

    wp_generate_attachment_metadata() currently does not skip thumbnails if they already exist. This is definitely worth bearing in mind if you have extra custom image sizes or a large volume or images as ALL image sizes are reprocessed which can take a very long time.

    I altered my copy of the plugin to check if the file for each image size already exists and only generate those required. Tests suggests this reduced the processing time by about 70%.

  6. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 3 years ago #

    Thanks for the reminder about this. I completely forgot. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic