Index: image.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v retrieving revision 1.249 diff -u -r1.249 image.module --- image.module 8 Aug 2007 15:41:39 -0000 1.249 +++ image.module 8 Aug 2007 16:17:10 -0000 @@ -583,13 +583,13 @@ while ($file = db_fetch_object($result)) { $node->images[$file->image_size] = $file->filepath; } - // If the image is smaller than the thumbnail and prevew images, we just use - // original image rather than creating new deriviatives. - if (empty($node->images[IMAGE_THUMBNAIL])) { - $node->images[IMAGE_THUMBNAIL] = $node->images[IMAGE_ORIGINAL]; - } - if (empty($node->images[IMAGE_PREVIEW])) { - $node->images[IMAGE_PREVIEW] = $node->images[IMAGE_ORIGINAL]; + // If the original image is smaller than the desired dimensions for a size, + // we don't bother creating a derivative image and just use the original + // instead. + foreach (image_get_sizes() as $key => $size) { + if (empty($node->images[$key])) { + $node->images[$key] = $node->images[IMAGE_ORIGINAL]; + } } }