This GitHub repository no longer contains the active source code for the
is-animatedNPM package.As of September 1, 2026, the package is maintained in the new repository:
FRSOURCE/is-animated.Please submit all new pull requests, issues, discussions and other project-related information to the new repository.
For more information about the transition, please see this issue: #26
Thank you for your understanding!
is-animated is a simple library for detecting animated images, it supports not only GIFs, but also APNG and WebP images.
npm install is-animated
const fs = require('fs')
const isAnimated = require('is-animated')
const filename = process.argv[2]
fs.readFile(filename, (err, buffer) => {
const answer = isAnimated(buffer) ? 'Yes' : 'No'
console.log(`Is "${filename}" animated? ${answer}.`)
})