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 🙏

© 2025 – Pkg Stats / Ryan Hefner

extract-image

v1.0.0

Published

A CLI tool that scans your project directory for image files (common formats like PNG, JPG, SVG, etc.) and outputs their paths along with size information.

Readme

extract-image

A CLI tool that scans your project directory for image files (common formats like PNG, JPG, SVG, etc.) and outputs their paths along with size information.

Helps developers quickly locate all image resources in a project. Supports filtering by included/excluded extensions, outputs JSON or text format, and can save results to a file. Cross-platform support (macOS / Windows / Linux).

Installation

npm install -g extract-image

🚀 Features

✅ Scan for common image file types: .png, .jpg, .jpeg, .gif, .webp, .bmp, .tiff, .svg, .ico, .avif, .heic

✅ Supports filtering scanned formats via --only and --exclude flags

✅ Outputs results in text or json format

✅ Outputs to console or saves to a specified output file

✅ Shows file size (in KB) alongside file path

✅ Cross-platform: macOS, Windows, Linux

Usage

image [target-directory] [--format text|json] [--output output-file] [--only ext1,ext2,...] [--exclude ext1,ext2,...]

If no directory is specified, it scans the current working directory.

Options

| Name | Type | Default | Description | | ------------------ | -------- | ------- | ------------------------------------------------------------------ | | --format / -f | string | text | Output format: text for plain list, json for detailed output | | --output / -o | string | null | Output file path. If omitted, prints results to the console | | --only | string | null | Comma-separated list of extensions to only include in scanning | | --exclude / -e | string | null | Comma-separated list of extensions to exclude from scanning | | target-directory | string | . | Directory to scan for image files (positional argument) |

Examples

Scan current directory and print text output

image

Scan ./assets directory and output JSON

image ./assets --format json

Scan ./src but only for .png and .jpg files

image ./src --only png,jpg

Scan ./images and exclude .ico and .webp files

image ./images --exclude ico,webp

Save scan results to a file in text format

image ./src -o images.txt

Output Example

Text Output (console or file):

assets/logo.png (12.45Kb)
images/background.jpg (234.52Kb)
icons/favicon.ico (4.32Kb)

JSON Output:

[
  {
    "file": "assets/logo.png",
    "size": "12.45Kb"
  },
  {
    "file": "images/background.jpg",
    "size": "234.52Kb"
  },
  {
    "file": "icons/favicon.ico",
    "size": "4.32Kb"
  }
]

License

MIT (see LICENSE)

© 2025-present VN666