Version 2.8.1 tagged on GitHub, also version 2.8.1 tagged on Packagist, yet the Packagist version suffers from the WEBP animation detection bug:
LINE 1536: case IMAGETYPE_WEBP:
// because animated WEBP images are not supported
// we need to check if this is such a file
// WEBP file header https://developers.google.com/speed/webp/docs/riff_container
// solution from by Sven Liivak https://stackoverflow.com/questions/45190469/how-to-identify-whether-webp-image-is-static-or-animated#answer-52333192
$fh = fopen($this->source_path, 'rb');
// let's see if this is the "Extended" file format
fseek($fh, 12);
// if this is the extended file format
if (fread($fh, 4) === 'VP8X') {
// look for the "Animation (A)" bit
LINE 1552: fseek($fh, 16); <----------------------------------- should be 20, not 16
// is this is an animated WEBP?
$is_animated = ((ord(fread($fh, 1)) >> 1) & 1);
}
Version 2.8.1 tagged on GitHub, also version 2.8.1 tagged on Packagist, yet the Packagist version suffers from the WEBP animation detection bug: