diff --git a/library/think/Validate.php b/library/think/Validate.php index c88d5b13..203eb944 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -547,7 +547,7 @@ class Validate $result = $value instanceof \think\File; break; case 'image': - $result = $value instanceof \think\File && exif_imagetype($value->getRealPath()); + $result = $value instanceof \think\File && in_array(exif_imagetype($value->getRealPath()), [1, 2, 3, 6]); break; default: if (isset(self::$type[$rule])) {