
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@the-node-forge/image-resizer-cli
Advanced tools
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
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.
sharp
for efficient processing.This package supports the following image formats:
.jpg
, .jpeg
).png
).webp
).tiff
).avif
)npm install -g @the-node-forge/image-resizer-cli
or using Yarn:
yarn global add @the-node-forge/image-resizer-cli
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) |
img-resizer resize input.jpg output.jpg --width 300 --height 200
ls -lh output.jpg # Check file details
open output.jpg # Open file (macOS)
start output.jpg # Open file (Windows)
img-resizer convert input.jpg output.png
img-resizer batch-resize images/ resized/ --width 500 --height 500
img-resizer compress input.jpg output.jpg --quality 80
img-resizer info input.jpg
When using img-resizer
, you can name the output file whatever you want,
including setting a custom directory.
img-resizer resize input.jpg my_custom_name.png --width 400 --height 300
my_custom_name.png
img-resizer resize input.jpg /images/optimized-photo.webp --width 600 --height 400
/images/optimized-photo.webp
If the output directory doesn’t exist, it will be automatically created.
Contributions are welcome! Please submit
issues or
pull requests.
If you find this package useful, please give it a ⭐ on
GitHub
FAQs
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
The npm package @the-node-forge/image-resizer-cli receives a total of 8 weekly downloads. As such, @the-node-forge/image-resizer-cli popularity was classified as not popular.
We found that @the-node-forge/image-resizer-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.