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; }