Fix fatal error when trying to resize animated WebP using GD

This commit is contained in:
Kijin Sung 2024-03-19 22:15:13 +09:00
parent d519cd2516
commit 13e8445309
2 changed files with 18 additions and 1 deletions

View file

@ -568,7 +568,7 @@ class FileHandler
{
$source = @imagecreatefrombmp($source_file);
}
elseif ($type === 'webp' && function_exists('imagecreatefromwebp'))
elseif ($type === 'webp' && function_exists('imagecreatefromwebp') && !Rhymix\Framework\Image::isAnimatedWebP($source_file))
{
$source = @imagecreatefromwebp($source_file);
}