Viewing 1 replies (of 1 total)
  • Plugin Contributor viper007bond

    (@viper007bond)

    Yes, look at how the ajax_process_image() function in my plugin works.

    Basically it’s this though, although you should check for errors along the way (see function):

    // Get path
    $fullsizepath = get_attached_file( $image_ID );
    
    // Generate meta data (this makes the thumbnail images)
    $metadata = wp_generate_attachment_metadata( $image_ID, $fullsizepath );
    
    // Save the meta data so WP knows the thumbs exist
    wp_update_attachment_metadata( $image_ID, $metadata );
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Regenerate Thumbnails] Call for specific attachment ID?’ is closed to new replies.