--- upload_image.module.original	2006-07-06 03:03:12.000000000 +0200
+++ upload_image.module	2006-09-07 13:11:29.390625000 +0200
@@ -58,7 +58,7 @@
 /**
  * Implementation of hook_nodeapi().
  */
-function upload_image_nodeapi(&$node, $op, $arg) {
+function upload_image_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
     case 'load':
       break;
@@ -82,6 +82,7 @@
               );
             }
             else {
+              unset($node->files[$fid]); // unset, so image won't appear as attachment
               $image = new StdClass();
               $image->nid = $images[$fid]->nid;
               image_load($image);
@@ -96,7 +97,12 @@
           $node->body .= theme('table', $header, $rows, array('id' => 'upload-image-attachments'));
         }
         if (count($thumbnails)) {
-          $node->body .= theme('upload_images', $thumbnails);
+          if ($teaser) {
+            $node->teaser = theme('upload_images_teaser', $node->teaser, $thumbnails);
+          }
+          else {                      
+            $node->body = theme('upload_images_body', $node->body, $thumbnails);
+          }
         }
       }
       break;
@@ -192,3 +198,11 @@
   $output .= '</div>';
   return $output;
 }
+
+function theme_upload_images_body($body, $thumbnails) {
+  return $body . theme('upload_images', $thumbnails);
+}
+
+function theme_upload_images_teaser($teaser, $thumbnails) {
+  return $teaser . theme('upload_images', $thumbnails);
+}
