Image Batch Processor CLI
Bulk process images from the command line.
Resize. Convert. Optimize. Watermark.
Quick Start
bash
npm install -g @lxgicstudios/imgbatch
bash
# Resize all images in folder imgbatch resize ./images --width 800 # Convert to WebP imgbatch convert ./images --format webp # Optimize for web imgbatch optimize ./images --quality 85
What It Does
Resize
- •Width/height constraints
- •Percentage scaling
- •Aspect ratio preservation
- •Multiple sizes (responsive images)
Convert
- •Format conversion (PNG, JPG, WebP, AVIF)
- •Batch processing
- •Quality control
- •Metadata handling
Optimize
- •Lossless compression
- •Quality-based compression
- •Strip metadata
- •Progressive JPEGs
Watermark
- •Text or image watermarks
- •Position control
- •Opacity settings
- •Batch application
Commands
bash
# Resize maintaining aspect ratio imgbatch resize ./images -w 1200 -o ./resized # Convert all to WebP imgbatch convert ./images -f webp -q 80 -o ./webp # Generate responsive sizes imgbatch responsive ./images --sizes 320,640,1280 -o ./responsive # Add watermark imgbatch watermark ./images --text "© 2024" --position bottomright # Compress for web imgbatch optimize ./images --target-size 200kb # Remove EXIF data imgbatch strip ./images --exif
Supported Formats
| Input | Output |
|---|---|
| PNG, JPG, GIF, TIFF, BMP | PNG, JPG, WebP, AVIF |
When to Use This
- •Website image optimization
- •Social media asset prep
- •Thumbnail generation
- •Photo batch processing
- •CDN asset optimization
Built by LXGIC Studios