From 8e5b09c687f36602cd6f8134124cd812c93d59fc Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 3 Apr 2024 19:41:14 +0200 Subject: [PATCH] Add webp to list of recognized image file types --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index f5c29f1c..8bdd3660 100644 --- a/post.php +++ b/post.php @@ -1158,7 +1158,7 @@ function handle_post() if (!$size = @getimagesize($file['tmp_name'])) { error($config['error']['invalidimg']); } - if (!in_array($size[2], array(IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_BMP))) { + if (!in_array($size[2], [IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_WEBP, IMAGETYPE_JPEG, IMAGETYPE_BMP])) { error($config['error']['invalidimg']); } if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {