Index: img_assist.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/img_assist.module,v
retrieving revision 1.56.2.16
diff -u -p -r1.56.2.16 img_assist.module
--- img_assist.module	1 Dec 2006 16:56:00 -0000	1.56.2.16
+++ img_assist.module	1 Dec 2006 17:19:05 -0000
@@ -1271,8 +1271,8 @@ function img_assist_render_image($attrib
     $img = img_assist_load_image($attributes['fid'], FALSE);
     $image = array_shift($img);
 
-    $width  = $attributes['width']  ? $attributes['width']  : $image->width;
-    $height = $attributes['height'] ? $attributes['height'] : $image->height;
+    $width  = $attributes['width']  ? $attributes['width']  : $image->thumbwidth;
+    $height = $attributes['height'] ? $attributes['height'] : $image->thumbheight;
     $src    = file_create_url($image->filepath);
     $class  = $attributes['class'] ? $attributes['class'] : 'image';
 
@@ -1562,6 +1562,7 @@ function img_assist_load_images($tid = n
     $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, f.* FROM {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid INNER JOIN {files} f ON n.nid = f.nid AND n.type = 'image' ". $where ." ORDER BY n.changed DESC"));
     while ($node = db_fetch_object($result)) {
       $node->filepath = file_create_path($node->filepath);
+      _img_assist_get_thumbnail($node);
       $dim = getimagesize($node->filepath, $info);
       $node->width  = $dim[0];
       $node->height = $dim[1];
@@ -1585,6 +1586,7 @@ function img_assist_load_images($tid = n
       $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, f.* FROM {files} f, {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid WHERE f.nid = n.nid AND f.filemime LIKE 'image/%%' AND n.nid NOT IN (". implode(array_keys($image), ', ') .") ". $where ." ORDER BY n.changed DESC"));
       while ($node = db_fetch_object($result)) {
         $node->filepath = file_create_path($node->filepath);
+        _img_assist_get_thumbnail($node);
         $dim = getimagesize($node->filepath, $info);
         $node->width  = $dim[0];
         $node->height = $dim[1];
@@ -1632,6 +1634,7 @@ function img_assist_load_image($id, $der
           $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, r.teaser, f.* FROM {files} f, {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid WHERE f.nid = n.nid AND n.nid = %d'), $node->nid);
           while ($node = db_fetch_object($result)) {
             $node->filepath = file_create_path($node->filepath);
+            _img_assist_get_thumbnail($node);
             $dim = getimagesize($node->filepath, $info);
             $node->width  = $dim[0];
             $node->height = $dim[1];
@@ -1685,4 +1688,3 @@ function theme_img_assist_legacy() {
 	return "<div class=\"%image-class\">\n  <a href=\"%node-link\"><img src=\"%src\" width=\"%width\" height=\"%height\" alt=\"%alt\" /></a>\n  <div class=\"caption\">%caption</div>\n</div>";
 }
 
-?>
