Title: [Plugin: Video Thumbnails] Create thumbnail when saving DRAFT
Last modified: August 19, 2016

---

# [Plugin: Video Thumbnails] Create thumbnail when saving DRAFT

 *  Resolved [werdcom](https://wordpress.org/support/users/werdcom/)
 * (@werdcom)
 * [15 years ago](https://wordpress.org/support/topic/plugin-video-thumbnails-create-thumbnail-when-saving-draft/)
 * Hi, I’d like to create the thumbnail when saving as a draft as I need to clean
   it up a bit first before publishing live. I looked through the plugin code and
   couldn’t find what to edit.
 * thank you!
 * marc

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Sutherland Boswell](https://wordpress.org/support/users/sutherlandboswell/)
 * (@sutherlandboswell)
 * [15 years ago](https://wordpress.org/support/topic/plugin-video-thumbnails-create-thumbnail-when-saving-draft/#post-2039574)
 * I disabled creation until the post is published because there were problems when
   a post was auto-saved as a draft. There might be a pretty easy solution though,
   look for this block of code:
 *     ```
       // Find video thumbnail when saving a post, but not on autosave
   
       add_action('new_to_publish', 'save_video_thumbnail', 10, 1);
       add_action('draft_to_publish', 'save_video_thumbnail', 10, 1);
       add_action('pending_to_publish', 'save_video_thumbnail', 10, 1);
       add_action('future_to_publish', 'save_video_thumbnail', 10, 1);
       ```
   
 * and immediately after add this:
 *     ```
       // Save with draft
   
       add_action('save_post', 'save_draft_video_thumbnail', 10, 1);
   
       function save_draft_video_thumbnail($post_id) {
       	$postdata = get_postdata($post_id);
       	if ($postdata['post_status'] == 'draft') {
       		get_video_thumbnail( $post_id );
       	}
       }
       ```
   
 * Give it a shot and let me know if and how it works! Depending on the results 
   I may add a setting to save a thumbnail with drafts.
 *  Thread Starter [werdcom](https://wordpress.org/support/users/werdcom/)
 * (@werdcom)
 * [15 years ago](https://wordpress.org/support/topic/plugin-video-thumbnails-create-thumbnail-when-saving-draft/#post-2039576)
 * It works!
 * Can’t thank you enough for this plugin.
 * marc

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Video Thumbnails] Create thumbnail when saving DRAFT’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/video-thumbnails_3e6f7f.svg)
 * [Video Thumbnails](https://wordpress.org/plugins/video-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/video-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/video-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/video-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/video-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/video-thumbnails/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [werdcom](https://wordpress.org/support/users/werdcom/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/plugin-video-thumbnails-create-thumbnail-when-saving-draft/#post-2039576)
 * Status: resolved