From 5c57c6cb652b5bf4689e4e0a3bc80d6a71547102 Mon Sep 17 00:00:00 2001 From: Mahmood Dehghani Date: Mon, 4 Mar 2024 09:30:58 +0330 Subject: [PATCH] add support for jfif files --- config/file-storage.php | 1 + src/functions.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/file-storage.php b/config/file-storage.php index 7511796..afd3c48 100644 --- a/config/file-storage.php +++ b/config/file-storage.php @@ -16,6 +16,7 @@ 'formats' => [ 'png' => 'jpg', 'webp' => 'jpg', + 'jfif' => 'jpg', 'heic' => 'jpg', ], ], diff --git a/src/functions.php b/src/functions.php index cda8168..3d16f80 100644 --- a/src/functions.php +++ b/src/functions.php @@ -5,5 +5,5 @@ function is_image(?string $filename): bool { - return $filename && preg_match('/\.(webp|heic|jpg|jpeg|png)$/i', $filename); + return $filename && preg_match('/\.(webp|heic|jfif|jpg|jpeg|png)$/i', $filename); }