don't try to show non existing images in index matrix
[phpfspot.git] / phpfspot_img.php
index 3a2a322d4cebc03e5bfa52c88d9970fcda187539..ec6c7db92be9cfd13b6fa7fc23efc0eaf259dfdf 100644 (file)
@@ -52,6 +52,10 @@ class PHPFSPOT_IMG {
 
    public function resize_image($image, $width)
    {
+      // if thumbnail already exists, don't recreate it
+      if(file_exists(dirname($image) ."/thumbs/". $width ."_". basename($image)))
+         return;
+
       $src_img = @imagecreatefromjpeg($image);
         
       if($src_img)