I'm trying to check if a file is a webp image in PHP
if (false != imagecreatefromwebp($filename)) {
//do something
}
But I get the following error
Warning: imagecreatefromwebp(): 'test.webp' is not a valid WEBP file
Same file can be successfully converted to jpg using online converts and I can also see that the file is actually a webp from the bytes
RIFF�5WEBPVP8X....