Getting Started
路
Demo
路
File an Issue
路
Have a question or an idea?
A simple library for detecting animated images.
Works under Node and Browser environments!
Performant & with small bundle size
Supports GIF, PNG, APNG, WebP and AVIF
Fully typed in Typescript
Published under MIT license
On 01.09.2026
is-animatedlibrary got massive overhaul and switched the repository it's built from (we're now using fork created by FRSOURCE team).For more information, see Migration note.
npm install is-animated
yarn add is-animated
pnpm add is-animated<input type="file" accept="image/*" />import isAnimated from 'is-animated';
const input = document.querySelector('input[type="file"]');
input.addEventListener('change', async function () {
const arrayBuffer = await this.files[0].arrayBuffer();
const answer = isAnimated(arrayBuffer) ? 'IS' : 'IS NOT';
alert(`File "${this.files[0].name}" ${answer} animated.`);
});If you prefer, you can import this library using unpkg:
<script defer src="https://unpkg.com/is-animated"></script>
import { readFileSync } from 'fs';
import isAnimated from 'is-animated';
readFileSync('my-test-file.png', (err, buffer) => {
const answer = isAnimated(buffer) ? 'IS' : 'IS NOT';
console.log(`File "my-test-file.png" ${answer} animated.`);
});For a working example, check out our demo.
Don鈥檛 hesitate to ask a question directly on the discussion board!
Changes for every release are documented in the release notes and CHANGELOG file.
On 01.09.2026 the library got upgraded using source from FRSOURCE fork which also became the new maintenance team!
Version 3:
- adds support for running
is-animatedunder browser environment, - adds support for AVIF format,
- adds support for ESM modules (.mjs),
- drops support for CommonJS,
- drops support for Node below version 20.
Migration path consists of two things: migrate to Node.js >= 20 and switch from CommonJS to ESM.
Everything else (whole API) stays the same. Enjoy!
- Check out the repository.
- Install dependencies using
pnpm i. - Run
pnpm testto run the test suite. - Run
pnpm startand visithttp://localhost:3000to see the documentation page. You can test the library using the demo section.
MIT @ 2024-present, Jakub FRS Freisler, FRSOURCE
MIT @ 2019-2024, J贸zef Soko艂owski
Forked from qzb's great library: is-animated.