Custom image size not regenerating when image editted

I have a custom image size at 200×150 that works fine in a plugin I’m working on. Uploading new files is no problem but when I edit an image, the default image sizes get regenerated but my custom size does not. Is there a way to force the regeneration programatically in a filter or something?

Related posts

Leave a Reply

1 comment

  1. To regenerate custom image size when image is edited in image editor , You have to add following options in wp_options table using update_option function along with add_image_size.

    Example :

    $img_size_name = 'custom-size'; // The new image size name.
    if ( function_exists( 'add_theme_support' ) )
    add_image_size($img_size_name, 100, 100 , true);
    
    update_option($img_size_name.'_size_w', 100);
    update_option($img_size_name.'_size_h', 100);
    update_option($img_size_name.'_crop', 1);