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

@the-node-forge/image-resizer-cli

v1.1.0

Published

A fast and lightweight CLI tool for resizing, compressing, and converting images in multiple formats (JPEG, PNG, WebP, etc.). Supports batch processing, custom dimensions, and high-quality optimization using Sharp. Ideal for developers, designers, and aut

Readme

Image Resizer CLI

License: MIT

Made with TypeScript

NPM Version Build Status Platform

Live Documentation

Image Resizer CLI is a fast, lightweight, and versatile Node.js CLI tool for resizing, converting, compressing, and optimizing images in JPEG, PNG, WebP, and other formats. It supports batch processing, custom dimensions, and high-quality compression using sharp. Ideal for developers, designers, and automation workflows needing quick and efficient image manipulation directly from the command line.


✨ Features

  • Resize Images – Easily scale images to custom dimensions.
  • Batch Resize – Resize multiple images at once.
  • Convert Image Format – Change images to PNG, JPG, WebP, and more.
  • Compress Images – Reduce file size while maintaining quality.
  • Retrieve Image Metadata – View image details (format, size, dimensions).
  • Cross-Platform – Works on Windows, macOS, and Linux.
  • Fast & Lightweight – Uses sharp for efficient processing.
  • TypeScript Support – Fully typed for safer development.

🎯 Supported Image Formats

This package supports the following image formats:

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • WebP (.webp)
  • TIFF (.tiff)
  • AVIF (.avif)

📚 Installation

npm install -g @the-node-forge/image-resizer-cli

or using Yarn:

yarn global add @the-node-forge/image-resizer-cli

🎯 List of Commands

| Command | Description | | ------------------------------------------------------------------------------------ | --------------------------------------------------------- | | img-resizer resize <input> <output> --width <number> --height <number> | Resize an image to specific dimensions | | img-resizer convert <input> <output> | Convert an image to a different format (e.g., PNG to JPG) | | img-resizer batch-resize <inputDir> <outputDir> --width <number> --height <number> | Resize all images in a directory | | img-resizer compress <input> <output> --quality <number> | Compress an image with adjustable quality (1-100) | | img-resizer info <input> | Display image metadata (format, size, dimensions) |


🛠️ Basic Usage

Resize an Image

img-resizer resize input.jpg output.jpg --width 300 --height 200

Check the Resized File

ls -lh output.jpg  # Check file details
open output.jpg     # Open file (macOS)
start output.jpg    # Open file (Windows)

Convert an Image Format

img-resizer convert input.jpg output.png

Batch Resize Multiple Images

img-resizer batch-resize images/ resized/ --width 500 --height 500

Compress an Image

img-resizer compress input.jpg output.jpg --quality 80

Get Image Metadata

img-resizer info input.jpg

📚 Custom Output File Naming

When using img-resizer, you can name the output file whatever you want, including setting a custom directory.

Example Custom Naming

img-resizer resize input.jpg my_custom_name.png --width 400 --height 300
  • Output file: my_custom_name.png
img-resizer resize input.jpg /images/optimized-photo.webp --width 600 --height 400
  • Output file: /images/optimized-photo.webp

If the output directory doesn’t exist, it will be automatically created.


👑 Contributing

Contributions are welcome! Please submit
issues or
pull requests.


⭐ Support

If you find this package useful, please give it a ⭐ on
GitHub


🔗 Links