Index: modules/image/image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.144
diff -u -F^f -r1.144 image.module
--- modules/image/image.module	4 Apr 2005 15:55:37 -0000	1.144
+++ modules/image/image.module	5 Apr 2005 13:36:08 -0000
@@ -76,6 +76,7 @@ function image_settings() {
   }
   $header = array(t('Label'), t('Width'), t('Height'));
   $size_group .= form_item(NULL, theme('table', $header , $rows), t('Select various pixel dimensions, "thumbnail" and "preview" are required.'));
+  $size_group .= form_checkbox(t('Save original image'), 'image_save_original', 1, variable_get('image_save_original', 1));
   $size_group .= form_checkbox(t('Allow users to view original image'), 'image_view_original', 1, variable_get('image_view_original', 0));
   $output.= form_group(t('Image sizes'), $size_group);
 
@@ -188,7 +189,7 @@ function image_link($type, $node, $main 
         }
       }
     }
-    if (variable_get('image_view_original', 0)) {
+    if (variable_get('image_view_original', 0) && $node->images['_original']) {
       $links[] = l(t('view original'), 'node/'.$node->nid, NULL, 'size=_original');
     }
   }
@@ -580,7 +581,12 @@ function _image_build_derivatives(&$node
       }
     }
   }
-  $node->images['_original'] = $node->file->filepath;
+  if(variable_get('image_save_original', 1)) {
+    $node->images['_original'] = $node->file->filepath;
+  }
+  else {
+    file_delete($node->file->filepath);
+  }
 }
 
 /**
