diff -uprN nodeimageblock.old/nodeimageblock.module nodeimageblock/nodeimageblock.module
--- nodeimageblock.old/nodeimageblock.module	2007-05-29 12:50:34.000000000 +0200
+++ nodeimageblock/nodeimageblock.module	2007-05-29 13:06:40.000000000 +0200
@@ -11,22 +11,48 @@
  *
  * Displays all images that are attached to the current node
  */
-function nodeimageblock_block($op = 'list', $delta = 0) {
+function nodeimageblock_block($op = 'list', $delta = 0, $edit = array()) {
   if ($op == 'list') {
     $block[0]['info'] = 'Node Image';
   }
+  elseif ($op == 'configure' &&  module_exists('imagecache')) {
+    $options = _imagecache_get_presets();
+    $options[0] = t('<none>');
+    ksort($options);
+    $form[nodeimageblock_imagecahce_preset] = array(
+      '#type' => 'select',
+      '#title' => 'Imagecache preset',
+      '#description' => 'Choose the Imagecache preset to use for the images in the Node Image Block.',
+      '#options' => $options,
+      '#default_value' => variable_get('nodeimageblock_imagecahce_preset', 0),
+    );
+    return $form;
+  }
+  elseif ($op == 'save') {
+    variable_set('nodeimageblock_imagecahce_preset', $edit['nodeimageblock_imagecahce_preset']);
+  }
   elseif ($op == 'view') {
     if (arg(0) == 'node') {
       $nid = arg(1);
       if ($node = node_load(array('nid' => $nid))) {
 
         // Get all images associated with this node
-        $imagesrc = _nodeimageblock_get_node_images($node);
+        $images = _nodeimageblock_get_node_images($node);
 
-        if (count($imagesrc) > 0) {
+        if (count($images) > 0) {
           $output = '';
-          foreach ($imagesrc as $img) {
-            $output .= theme('nodeimageblock_block_item', $node, $img);
+          if (($imagecache_preset = variable_get('nodeimageblock_imagecahce_preset', 0)) && module_exists('imagecache')) {
+            $imagecache_preset = _imagecache_preset_load($imagecache_preset);
+            foreach($images as $img) {
+              $html = theme('imagecache', $imagecache_preset, $img->filepath, $img->description, $img->description);
+              $output .= theme('nodeimageblock_block_item', $html, $img);
+            }
+          }
+          else {
+            foreach($images as $img) {
+              $html = theme('image', $img->filepath, $img->description, $img->description);
+              $output .= theme('nodeimageblock_block_item', $html, $img);
+            }
           }
 
           $block['subject'] = '';
@@ -46,10 +72,11 @@ function theme_nodeimageblock_block($ite
   return $output;
 }
 
-function theme_nodeimageblock_block_item($node, $imagesrc) {
+function theme_nodeimageblock_block_item($html, $img) {
   $output = '
   <div class="nodeimage">
-      <img src="' . $imagesrc . '" alt="" />
+    '. $html .'
+		<p>'. $img->description .'</p>
   </div>';
 
   return $output;
@@ -65,8 +92,8 @@ function _nodeimageblock_get_node_images
     foreach ($files as $file) {
 
       // --- Is the file an image?
-      if (in_array($file->filemime, $image_mime)) {
-        $images[] = file_create_url($file->filepath);
+      if(in_array($file->filemime, $image_mime)) {
+        $images[] = $file;
       }
     }
   }
