]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageService.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / app / Uploads / ImageService.php
index 038e6aa417c839b8f794038ec2bd40545f71e111..a8f1445173765d7384aa774d3b80654068741d0a 100644 (file)
@@ -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 {