WordPress.org

Support

Support » Plugins and Hacks » Regenerate Thumbnails » [Plugin: Regenerate Thumbnails] Suggestion/request/beg: auto-regenerate

[Plugin: Regenerate Thumbnails] Suggestion/request/beg: auto-regenerate

  • Hi,

    I would really really really really love it if there was a way to automatically run “regenerate thumbnails” automatically after an image was edited in the edit media thickbox. This way, when an editor uploads an image and crops it, for example, then he doesn’t have to leave the article page and go to the media library in order to regenerate thumbnails for an image he just uploaded.

    This is a necessity, because silly WordPress core does not handle custom image sizes when you, for example, crop an image. Although it says “apply all changes to all sizes” – it in fact does not do that for the sizes added via add_image_size()…. So the Regenerate Thumbails plugin is really my only hope :/

    So can I beg? 🙂

    Thanks!

    Bira

    http://wordpress.org/extend/plugins/regenerate-thumbnails/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I agree it would be a really useful feature.

    You can make it happen without the plugin by adding the following to functions.php

    add_action('image_save_pre', 'add_image_options');
    function add_image_options($data){
    	global $_wp_additional_image_sizes;
    	foreach($_wp_additional_image_sizes as $size => $properties){
    		update_option($size."_size_w", $properties['width']);
    		update_option($size."_size_h", $properties['height']);
    		update_option($size."_crop", $properties['crop']);
    	}
    	return $data;
    }

    Hope that helps,

    Harry

    I am running into this issue right now as well and would also agree that this would be a great feature addition for the plugin (and to core!), even if it at minimum there was a “Regenerate Thumbnail” link in post’s media window.

    @harryrobbins ps, thanks for that snippet- totally did the trick.

    Was a difficult support post to find (spent a few hours looking for the answer), so here are some search tags/content to help future users out: “regenerate and save custom thumbnails and custom image sizes after crop in WordPress image editor”.

    Hi Harry,

    Many thanks for this snippet. I am going to add it and see how it goes.

    Very much appreciate your assistance.

    Best,

    Bira

    Can we make the functions of Regenerate Thumbnails available not only for the role of administrator but also the role of author and editor in the media gallery?

    When we add the code below to the theme’s functions.php, then we can make the thumbnails to be auto-regenerated,really? Really wonderful!

    add_action('image_save_pre', 'add_image_options');
    function add_image_options($data){
    	global $_wp_additional_image_sizes;
    	foreach($_wp_additional_image_sizes as $size => $properties){
    		update_option($size."_size_w", $properties['width']);
    		update_option($size."_size_h", $properties['height']);
    		update_option($size."_crop", $properties['crop']);
    	}
    	return $data;
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Regenerate Thumbnails] Suggestion/request/beg: auto-regenerate’ is closed to new replies.
Skip to toolbar