summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot_img.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpfspot_img.php b/phpfspot_img.php
index 3a2a322..ec6c7db 100644
--- a/phpfspot_img.php
+++ b/phpfspot_img.php
@@ -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)