perf: 优化缩略图

This commit is contained in:
kuaifan
2024-10-30 13:57:38 +08:00
parent 6ebca3befa
commit b8852f821c
8 changed files with 24 additions and 39 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ class Image
if ($quality > 0) {
Image::compressImage($savePath, null, $quality);
}
if (filesize($savePath) >= filesize($imagePath)) {
if ($savePath != $imagePath && filesize($savePath) >= filesize($imagePath)) {
unlink($savePath);
symlink(basename($imagePath), $savePath);
}