image-optimizer: Batch Compress and Resize Images from CLI
Web performance matters. Large images slow down your site, hurt SEO, and frustrate users. image-optimizer gives you a dead-simple CLI to optimize all your images in one command.
Installation
npm install -g batch-image-tool
Features
Compress Images
batch-image-tool compress ./images/ -o ./optimized/
# Shrinks file size by 60-80% without visible quality loss
Resize
batch-image-tool resize ./images/ --width 1200 -o ./web/
Convert Format
batch-image-tool convert ./images/ --format webp -o ./web/
Batch Process
batch-image-tool process ./raw/ --compress --resize 1920 --format jpg
Supported Formats
- JPEG / JPG ✅
- PNG ✅
- WebP ✅
- BMP ✅
- TIFF ✅
Real-World Use
# Optimize an entire photo gallery
batch-image-tool process ./photos/ --resize 1920 --quality 80 -o ./web/
# Create thumbnails
batch-image-tool resize ./photos/ --width 300 -o ./thumbs/
Links
💻 GitHub: github.com/lb1192176991-lab/batch-image-tool
🌐 Visit us: https://www.tucaowall.vip/
Need more file processing tools? Check out the sibling packages for CSV, JSON, PDF, and text processing!
☁️ Get free DigitalOcean credit: https://m.do.co/c/fc5cb7b29a0d
Top comments (0)