PHP GD and WebP support:
Normal WebP (VP8): supported since PHP 5.4
Transparent WebP or alpha transparency (VP8X, VP8L): supported since PHP 7.0
Animated WebP (VP8X): not supported at all.
You can use the images from here https://www.php.net/manual/en/function.pack.php unpack format reference.
* @link https://stackoverflow.com/a/68491679/128761
Usage:
<?php
$info = webpinfo('your-image.webp');
if (isset($info['Animation']) && $info['Animation'] === true) {
echo 'It is animated webp.';
}
if (isset($info['Alpha']) && $info['Alpha'] === true) {
echo 'It is transparent webp.';
}
?>