From 9e8209064db1e06b99b98ff3309d368d110b22b3 Mon Sep 17 00:00:00 2001 From: Sebastien SAUVAGE Date: Wed, 27 Feb 2013 21:24:41 +0100 Subject: [PATCH] Corrected thumbnail creation. Because some systems do not allow file overwriting when doing a rename(). --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index 1ac5187..4068272 100644 --- a/index.php +++ b/index.php @@ -2336,6 +2336,7 @@ function resizeImage($filepath) imagejpeg($im2, $tempname, 90); imagedestroy($im); imagedestroy($im2); + unlink($filepath); rename($tempname,$filepath); // Overwrite original picture with thumbnail. return true; }