# image-size/image-size

Node module for detecting image dimensions

Repository: https://github.com/image-size/image-size
Canonical: https://ross.abutalabs.com/products/image-size
Language: TypeScript
License: MIT
License Family: permissive
Topics: dimensions, image-analysis, image-size
Archived: true
Last push: 2026-06-03T09:55:04+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 85, release rhythm 40, longevity 100
- inputs: {"age_days": 4811, "days_push": 91, "days_rel": 518, "gap_med": 17.5, "n_releases_24m": 5}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2230, forks 238 (observed 2026-08-28T04:06:29.035064+00:00)

## What it is
A fast, zero-dependency Node.js library that detects image dimensions by reading only image headers, supporting all major formats including JPEG, PNG, GIF, WebP, HEIC, SVG, and TIFF. It works with both files and buffers, offers ESM and CommonJS support, and includes TypeScript types.

## Use cases
- get width and height of an image file in node
- detect image dimensions from a buffer or stream
- read image resolution without loading the whole file
- validate uploaded image sizes in a web server
- check dimensions of jpeg png webp heic files
- batch measure image dimensions from a directory

## When to choose
- you need lightweight, dependency-free dimension detection in Node.js
- you only need width/height, not full image decoding
- you work with buffers from streams or network requests
- you need broad format coverage including HEIC, JPEG-XL, and KTX

## When to avoid
- you need to decode, resize, or transform images (use sharp instead)
- you need a maintained GitHub repo - it is archived and development moved to Codeberg
- you need browser/DOM-based image handling
- you need EXIF or other metadata beyond dimensions

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, parser
- domain: image-processing, files, developer-tools
- platform: cross-platform
- tags: image-dimensions, image-metadata, zero-dependency, typescript, archived-on-github, nodejs

## Member repositories
- image-size/image-size (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:29.035064+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:44:38.286744+00:00, confidence not recorded.
  - readme: https://github.com/image-size/image-size (fetched 2026-08-28T04:06:29.035064+00:00, sha 042cc037344f)
  - registry_npm: https://registry.npmjs.org/image-size (fetched 2026-08-29T10:25:10.454197+00:00, sha c19def14e448)
- Data as of 2026-08-30T08:39:29.467469+00:00.
