diff --git video.field.inc video.field.inc
index 10f38068626916c9f74c30379d71f5773bce8949..71f8a3aeb403c333b966fedf3d532fd3d63441bc 100644
--- video.field.inc
+++ video.field.inc
@@ -130,7 +130,7 @@ function video_field_prepare_view($entity_type, $entities, $field, $instances, $
  * Implements hook_field_presave().
  */
 function video_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
-  // change the theumbnails if default is checked
+  // change the thumbnail if default is checked
   foreach ($items as $delta => $item) {
     if (!empty($field['settings']['default_video_thumbnail']['fid'])) {
       if ($item['use_default_video_thumb'])
@@ -156,6 +156,14 @@ function video_field_presave($entity_type, $entity, $field, $instance, $langcode
  * Implements hook_field_insert().
  */
 function video_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  //add usage for the thumnail
+  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+  foreach ($items as $item) {
+    if (!empty($item['thumbnail'])) {
+      $file = file_load($item['thumbnail']);
+      file_usage_add($file, 'video', $entity_type, $id);
+    }
+  }
   file_field_insert($entity_type, $entity, $field, $instance, $langcode, $items);
   // calling function to handle conversion when auto conversion is enabled
   _video_field_file_autoconversion($entity_type, $entity, $field, $instance, $langcode, $items);
@@ -165,6 +173,7 @@ function video_field_insert($entity_type, $entity, $field, $instance, $langcode,
  * Implements hook_field_update().
  */
 function video_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  video_thumbnail_update_all($entity_type, $entity, $field, $instance, $langcode, $items);
   file_field_update($entity_type, $entity, $field, $instance, $langcode, $items);
   // calling function to handle conversion when auto conversion is enabled
   _video_field_file_autoconversion($entity_type, $entity, $field, $instance, $langcode, $items);
@@ -230,10 +239,90 @@ function _video_field_file_autoconversion($entity_type, $entity, $field, $instan
   }
 }
 
+function video_thumbnail_update_all($entity_type, $entity, $field, $instance, $langcode, &$items) {
+   list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+
+  // On new revisions, all files are considered to be a new usage and no
+  // deletion of previous file usages are necessary.
+  if (!empty($entity->revision)) {
+    foreach ($items as $item) {
+      $file = file_load($item['thumbnail']);
+      file_usage_add($file, 'video', $entity_type, $id);
+    }
+    return;
+  }
+  
+  // Build a display of the current FIDs.
+  $current_thumbnail_fids = array();
+  foreach ($items as $item) {
+    $current_thumbnail_fids[] = $item['thumbnail'];
+  }
+
+  // Create a bare-bones entity so that we can load its previous values.
+  $original = entity_create_stub_entity($entity_type, array($id, $vid, $bundle));
+  field_attach_load($entity_type, array($id => $original), FIELD_LOAD_CURRENT, array('field_id' => $field['id']));
+  
+  // Compare the original field values with the ones that are being saved.
+  $original_fids = array();
+  if (!empty($original->{$field['field_name']}[$langcode])) {
+    foreach ($original->{$field['field_name']}[$langcode] as $original_item) {
+      $original_fids[] = $original_item['thumbnail'];
+      if (isset($original_item['thumbnail']) && !in_array($original_item['thumbnail'], $current_thumbnail_fids)) {
+        // Decrement the file usage count by 1 and delete the file if possible.
+        $original_item_file = file_load($original_item['thumbnail']);
+        video_thumnail_delete($original_item_file, $entity_type, $id);
+      }
+    }
+  }
+
+  // Add new usage entries for newly added files.
+  foreach ($items as $item) {
+    if (!in_array($item['thumbnail'], $original_fids)) {
+      $file = file_load($item['thumbnail']);
+      file_usage_add($file, 'video', $entity_type, $id);
+    }
+  }
+  
+}
+
+
+/**
+ *  Delete all thumnails of an entity
+ */
+function video_thumnails_delete_all($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+  foreach ($items as $item) {
+    if (!empty($item['thumbnail'])) {
+      //we can certainly build the file object without file_load
+      $file = file_load($item['thumbnail']);
+      video_thumnail_delete($file, $entity_type, $id, 0);
+    }
+  }
+}
+
+/**
+ *  Delete a thumnail
+ */
+function video_thumnail_delete($file, $entity_type, $id, $count = 1) {
+  // To prevent the file field from deleting files it doesn't know about, check
+  // the file reference count. Temporary files can be deleted because they
+  // are not yet associated with any content at all.
+  $file_usage = file_usage_list($file);
+  if (!empty($file_usage['video'])) {
+    file_usage_delete($file, 'video', $entity_type, $id, $count);
+    return file_delete($file);
+  }
+
+  // Even if the file is not deleted, return TRUE to indicate the file field
+  // record can be removed from the field database tables.
+  return TRUE;
+}
+
 /**
  * Implements hook_field_delete().
  */
 function video_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  video_thumnails_delete_all($entity_type, $entity, $field, $instance, $langcode, $items);
   file_field_delete($entity_type, $entity, $field, $instance, $langcode, $items);
 }
 
@@ -241,6 +330,7 @@ function video_field_delete($entity_type, $entity, $field, $instance, $langcode,
  * Implements hook_field_delete_revision().
  */
 function video_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  video_thumnails_delete_all($entity_type, $entity, $field, $instance, $langcode, $items);
   file_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, $items);
 }
 
