npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lowdep/img-info

v1.0.0

Published

Image metadata CLI — dimensions, format, color space, EXIF — no ImageMagick, zero dependencies, works on Windows

Readme

img-info

Zero dependencies Node License: MIT Platform

Image metadata from the terminal — no ImageMagick, no native deps, works on Windows.

Reads format headers directly from binary data to extract dimensions, color space, bit depth, file size, and EXIF data (for JPEGs).


Supported Formats

| Format | Dimensions | Color Space | Bit Depth | EXIF | |---|---|---|---|---| | PNG | ✓ | ✓ | ✓ | — | | JPEG | ✓ | ✓ | — | ✓ (make, model, orientation) | | GIF | ✓ | Indexed | — | — | | WebP | ✓ (lossy/lossless/extended) | RGB/RGBA | — | — | | BMP | ✓ | ✓ | ✓ | — | | ICO | All sizes listed | — | — | — | | SVG | ✓ (from attributes) | Vector | — | — |


Install

npm install -g img-info

Or without installing:

npx img-info logo.png

Usage

img-info <file> [file2 ...]
img-info --json <file>

Examples

# Single file
img-info logo.png

# Multiple files
img-info *.jpg

# JSON output (pipe-friendly)
img-info banner.webp --json

# Batch audit a directory
ls *.png | xargs img-info

Example Output

logo.png  /path/to/logo.png
  Format        PNG
  Dimensions    1200 × 630 px  16:9
  Color space   RGBA
  Bit depth     8
  File size     142.3 KB  (145,792 bytes)
  Modified      5/27/2026, 10:30:00 AM

photo.jpg  /path/to/photo.jpg
  Format        JPEG
  Dimensions    4032 × 3024 px  4:3
  Color space   YCbCr (RGB)
  File size     3.21 MB  (3,366,912 bytes)
  Modified      5/26/2026, 4:15:00 PM
  EXIF
    make        Apple
    model       iPhone 15 Pro
    orientation Normal

JSON output (--json):

{
  "file": "/path/to/logo.png",
  "format": "PNG",
  "width": 1200,
  "height": 630,
  "fileSize": 145792,
  "colorSpace": "RGBA",
  "bitDepth": 8
}

How It Works

img-info reads only the first 64KB of each file and parses the format-specific binary header:

  • PNG: reads IHDR chunk at offset 16 (8-byte signature + 8-byte chunk header)
  • JPEG: scans for SOF0/SOF1/SOF2 markers; reads APP1 for EXIF IFD
  • GIF: reads GIF87a/GIF89a header, width/height at bytes 6–9 (little-endian)
  • WebP: reads RIFFWEBP container, parses VP8 /VP8L/VP8X sub-chunks
  • BMP: reads DIB header starting at byte 14
  • ICO: reads directory entries listing all embedded icon sizes
  • SVG: scans first 2KB for width=, height=, and viewBox= attributes

No child processes. No native binaries. No network.


License

MIT


Keywords

image metadata · image dimensions · png size · jpeg dimensions · exif · imagemagick alternative · identify image · width height · zero dependencies · cli


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.