I think I've figured out how to get webp thumbnails - it could just be a one line addition to the code.
I downloaded and installed version 2.0.19 of SMF. That version uses GD for creating thumbnails and GD has had support for webp for several years so it is very possible that the GD library used on the forum supports webp.
It is very easy to test... just place this .php file on the server (call it foo.php):

and when you access /foo.php you will get output like:
(
[GD Version] => 2.3.3
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPEG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] => 1
[XBM Support] => 1
[WebP Support] => 1
[BMP Support] => 1
[AVIF Support] =>
[TGA Read Support] => 1
[JIS-mapped Japanese Font Support] =>
)
and look for
[WebP Support] => 1.
If GD has webp support then adding a single line of code will enable it.
Around line 325 in Sources/Subs-Grpahics.php add the green line in the
resizeImageFile function:
function resizeImageFile($source, $destination, $max_width, $max_height, $preferred_format = 0)
{
global $sourcedir;
// Nothing to do without GD
if (!checkGD())
return false;
static $default_formats = array(
'1' => 'gif',
'2' => 'jpeg',
'3' => 'png',
'6' => 'bmp',
'15' => 'wbmp'
,'18' => 'webp'
);
Note that the new line begins with a comma.
What's going on... GD provides several functions to import images from a file:
imagecreatefromgif(),
imagecreatefrompng(),
imagecreatefromjpeg(), etc. The problem is that you have to decide which of these functions to call. To determine that you first call
getimagesize() which returns the image dimensions as well as a numeric code indicating what kind of image it is (gif, jpeg, png, etc.) You'll find those numeric codes in the
$default_formats table. By adding a new entry for code 18 mapping to 'webp' the SMF code will call
imagecreatefromwebp() on webp images.