diff --git a/src/Filesystem/AbstractAdapter.php b/src/Filesystem/AbstractAdapter.php index 1a803fa87c..bcb7218ee7 100644 --- a/src/Filesystem/AbstractAdapter.php +++ b/src/Filesystem/AbstractAdapter.php @@ -100,7 +100,7 @@ public function isImage($path) { return in_array( strtolower($this->extension($path)), - ['jpg', 'jpeg', 'png', 'gif'] + ['jpg', 'jpeg', 'png', 'gif', 'webp', 'avif'] ); } diff --git a/tests/Imaging/ImageValidatorTest.php b/tests/Imaging/ImageValidatorTest.php index 0d18443940..81d74b0e0e 100644 --- a/tests/Imaging/ImageValidatorTest.php +++ b/tests/Imaging/ImageValidatorTest.php @@ -20,7 +20,7 @@ public function it_checks_if_image_has_valid_extension_and_mimetype() ]]); // We'll test `isValidExtension()` functionality separately below, and just mock here... - ImageValidator::shouldReceive('isValidExtension')->andReturnTrue()->times(23); + ImageValidator::shouldReceive('isValidExtension')->andReturnTrue()->times(24); ImageValidator::makePartial(); $this->assertTrue(ImageValidator::isValidImage('jpg', 'image/jpeg'));