I acquired strange behavior after i added filter for attachment_fields_to_save, after i save the pictures, it doesn't wish to save image metadata for example title, description and caption.

Why I have to add the hepa filter? Because I've plenty of custom dimensions by using this code:

add_image_size("imagesize-940x360", 940, 360, true);

And also the image might not properly place in great place, therefore the user want to use Wordpress awesome tools to edit the look like popping and scaling.

For many silly reason (or possibly this really is bug), the Wordpress doesn't generate image for custom image dimensions.

To be able to achieve generation for custom dimensions, I have to add filter when user press save button within the Wordpress image editor. This is actually the piece code which i used:

add_filter("attachment_fields_to_save", "rl_regenerate_image", 99, 2);
function rl_regenerate_image($post, $attachment)
{
    $id = $post['ID'];

    $fullsizepath = get_attached_file($id);
    wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $fullsizepath));

    return true;
}

The code above creates the custom dimensions when user edit the look properly but sadly it doesn't save all up-to-date metadata images for example title, caption and outline.

Do everyone understand how to solve this issue? What exactly I must achieve is how you can generate "edited" images for custom dimensions and save the metadata properly.

Thanks ahead of time!

Just in case this has not been solved yet, or any Googler's available.. Here is a wordpress plugin known as Publish Thumbnail Editor that allows you edit individual custom image dimensions. Is effective.

http://wordpress.org/extend/plugins/post-thumbnail-editor/