vite-plugin-image-optimizer
vite-plugin-image-optimizer copied to clipboard
Animated webp images are not animated after optimization
Hello, I've noticed that I can't use the plugin with webp animations.
https://github.com/FatehAK/vite-plugin-image-optimizer/blame/a281c44fd2d18dd91d2c093704833b5592fb86f4/src/index.ts#L104
return await sharp(buffer, { animated: extName === 'gif' })
I guess it's related to this condition. Is it something that can be fixed?
Thank you!
In addition, except webp images, apng images are also not supported. Although the sharp library does not support apng image format yet, it is better to also include "png" and "apng" extensions here as well.