explaingit

sapphi-red/node-midec

Analysis updated 2026-07-17 · repo last pushed 2021-06-09

1GoAudience · developerComplexity · 2/5DormantSetup · easy

TLDR

A lightweight WebAssembly library that tells you whether an image file (GIF, APNG, WebP, HEIF/AVIF) is animated or static.

Mindmap

mindmap
  root((repo))
    What it does
      Detects animated images
      Supports many formats
      Runs via WebAssembly
    Tech stack
      Go
      WebAssembly
      JavaScript
    Use cases
      Show play button on GIFs
      Validate uploads
      Optimize image delivery
    Audience
      Web developers
      Backend developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Detect whether an uploaded image is animated so you can show a play button icon.

USE CASE 2

Validate and categorize animated vs static images on the server before storing them.

USE CASE 3

Optimize delivery differently for static images versus animated GIFs or WebP files.

USE CASE 4

Check APNG, animated WebP, or HEIF/AVIF files for animation without external services.

What is it built with?

GoWebAssemblyJavaScriptNode.js

How does it compare?

sapphi-red/node-midecaegrail/aegrail-engineaeneasr/form
Stars111
LanguageGoGoGo
Last pushed2021-06-092019-03-08
MaintenanceDormantDormant
Setup difficultyeasyhardeasy
Complexity2/55/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

README is minimal, check the GitHub repo directly for supported formats and edge cases.

In plain English

This repository provides a simple tool for detecting whether an image file is animated or static. It works with several modern image formats including animated GIFs, APNG (animated PNG), animated WebP, and animated HEIF/AVIF files. The benefit: instead of trying to parse image files yourself or relying on external services, you get a lightweight library that runs directly in your JavaScript application. The library is built using WebAssembly, which is a compact, fast binary format that browsers and Node.js can execute. The original detection logic was written in Go, then converted to WebAssembly so it can run anywhere JavaScript runs, whether that's in a web browser, a Node.js server, or anywhere else. You feed it a file's raw bytes and ask "is this animated?" and it returns a simple true or false answer. Using it is straightforward: you import the isAnimated function, load a file's contents as binary data, pass it to the function, and get back whether the image is animated. This is useful for web applications that need to handle images differently based on whether they're static or animated, for example, showing a play button only on animated images, or optimizing delivery of static images differently than videos. It's also handy for image upload systems that want to validate or categorize files on the server side before storing them. The project is a JavaScript wrapper around existing Go code, meaning it benefits from the reliability of an already-tested detector while making it accessible to JavaScript developers. The README doesn't include extensive documentation beyond a basic example, so you'd want to check the GitHub repository directly for more details on supported formats or edge cases.

Copy-paste prompts

Prompt 1
Show me how to use the isAnimated function from node-midec to check an uploaded file.
Prompt 2
Help me integrate node-midec into a Node.js image upload endpoint to reject or flag animated files.
Prompt 3
Explain how node-midec detects animation across GIF, APNG, WebP, and AVIF formats.
Prompt 4
How do I use this WebAssembly library in the browser to check if a dropped image file is animated?

Frequently asked questions

What is node-midec?

A lightweight WebAssembly library that tells you whether an image file (GIF, APNG, WebP, HEIF/AVIF) is animated or static.

What language is node-midec written in?

Mainly Go. The stack also includes Go, WebAssembly, JavaScript.

Is node-midec actively maintained?

Dormant — no commits in 2+ years (last push 2021-06-09).

How hard is node-midec to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is node-midec for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.