Index: img_assist.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/img_assist/img_assist.module,v
retrieving revision 1.25
diff -u -F^f -r1.25 img_assist.module
--- img_assist.module	3 Mar 2005 00:42:16 -0000	1.25
+++ img_assist.module	17 Mar 2005 03:44:37 -0000
@@ -404,7 +404,7 @@ function img_assist_load_image($id) {
  *
  */
 function _img_assist_get_thumbnail(&$image) {
-  $thumbpath = file_create_path(substr($image->filepath, 0, strpos($image->filepath, '.')) .'.thumbnail'. $type . substr($image->filepath, strrpos($image->filepath, '.')));
+  $thumbpath = preg_replace('/\.preview\.([a-zA-Z]+])$/','.thumbpath.$1',$image->filepath);
   // In the really old version of image.module thumbnail names were 'thumb_filename.ext'.
   if (!file_exists($thumbpath)) {
     $pos = strrpos($image->filepath, '/') + 1;
@@ -492,7 +492,7 @@ function img_assist_load_directory() {
           $thumb_height = ceil(($thumb_height * $thumb_prop) / 100);
           $thumb_width  = $max_width;
         }
-        $output .= l("<img src=\"$image->thumbpath\" width=\"$thumb_width\" height=\"$thumb_height\" title=\"$image->title\">", "img_assist/load/preview/$image->fid", array('target' => 'img_assist_preview', 'title' => $image->title)). "\n";
+        $output .= l("<img src=\"".file_create_url($image->thumbpath)."\" width=\"$thumb_width\" height=\"$thumb_height\" title=\"$image->title\">", "img_assist/load/preview/$image->fid", array('target' => 'img_assist_preview', 'title' => $image->title)). "\n";
       }
       else {
         $output .= "<div align=\"left\">\n<ul>\n";
@@ -523,7 +523,7 @@ function img_assist_load_preview($id = n
     $img = img_assist_load_image($id);
     $dim = ($img->width <= 190) ? "width=\"$img->width\" height=\"$img->height\"" : 'width="100%"';
 
-    $output .= l("<img src=\"$img->filepath\" $dim border=\"1\" />", "img_assist/load/properties/$img->fid", array('target' => 'img_assist_properties'));
+    $output .= l("<img src=\"".file_create_url($img->filepath)."\" $dim border=\"1\" />", "img_assist/load/properties/$img->fid", array('target' => 'img_assist_properties'));
     $output .= "<br />". l($img->title, "node/$img->fid", array('target' => '_blank')). " ($img->width x $img->height)\n";
 
     /* If the directory view is the one invoking this function  */
