1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

webp support

This commit is contained in:
Lorenzo Yario 2024-02-14 03:15:21 -08:00 committed by GitHub
parent 23670bae4f
commit 2a0c495b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -983,7 +983,7 @@ if (isset($_POST['delete'])) {
if (!$size = @getimagesize($file['tmp_name'])) { if (!$size = @getimagesize($file['tmp_name'])) {
error($config['error']['invalidimg']); error($config['error']['invalidimg']);
} }
if (!in_array($size[2], array(IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_BMP))) { if (!in_array($size[2], array(IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_BMP, IMAGETYPE_WEBP))) {
error($config['error']['invalidimg']); error($config['error']['invalidimg']);
} }
if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) { if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {