node-midec
Multi-image detector (Wasm). cf. Animated GIF, APNG, Animated WebP, Animated HEIF/AVIF.
Pure Webassembly + JavaScript port of midec.
Installation
$ npm i node-midec
Example
import { isAnimated } from 'node-midec'
import fs from 'fs/promises'
const filePath = new URL('./animated.gif', import.meta.url)
const file = await fs.readFile(filePath)
const result = await isAnimated(file)
console.log(`animated.gif is ${result ? '' : 'not '}an animated image.`)