From 8f21a055ade6c40b160e1366ffd41f781d79621a Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sat, 27 Feb 2021 19:53:49 +0100 Subject: [PATCH] [ticket/16712] Implement thumbnails for WEBP images in attachments PHPBB3-16712 --- phpBB/includes/functions_posting.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index dd6313f666..a3b743777f 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -659,6 +659,10 @@ function create_thumbnail($source, $destination, $mimetype) case IMG_WBMP: $image = @imagecreatefromwbmp($source); break; + + case IMG_WEBP: + $image = @imagecreatefromwebp($source); + break; } if (empty($image)) @@ -710,6 +714,10 @@ function create_thumbnail($source, $destination, $mimetype) case IMG_WBMP: imagewbmp($new_image, $destination); break; + + case IMG_WEBP: + imagewebp($new_image, $destination); + break; } imagedestroy($new_image);