X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/5164375b18f0af6dfb6b3bd35542e40bf2406176..refs/pull/5676/head:/app/Uploads/ImageService.php diff --git a/app/Uploads/ImageService.php b/app/Uploads/ImageService.php index 038e6aa41..a8f144517 100644 --- a/app/Uploads/ImageService.php +++ b/app/Uploads/ImageService.php @@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse; class ImageService { - protected static array $supportedExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp']; + protected static array $supportedExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'avif']; public function __construct( protected ImageStorage $storage, @@ -31,8 +31,8 @@ class ImageService UploadedFile $uploadedFile, string $type, int $uploadedTo = 0, - int $resizeWidth = null, - int $resizeHeight = null, + ?int $resizeWidth = null, + ?int $resizeHeight = null, bool $keepRatio = true, string $imageName = '', ): Image {