img-info-cli
v1.0.0
Published
CLI tool for viewing image info and optimizing PNG/JPEG/WEBP images. Supports batch processing and quality control.
Maintainers
Readme
🖼️ image-optimize-cli
A zero-dependency CLI tool for viewing image metadata and basic optimization info for PNG, JPEG, and WEBP formats.
Install
npm install -g image-optimize-cliUsage
# Show basic info for a single image
image-optimize photo.jpg
# Batch process with glob patterns
image-optimize images/*.png
# Verbose output (bit depth, color type, components)
image-optimize *.jpg --verbose
# List supported formats
image-optimize --listExamples
$ image-optimize screenshot.png
screenshot.png PNG 1920×1080 245.8 KB
$ image-optimize *.jpg *.png --verbose
photo.jpg JPEG 800×600 156.2 KB
Components: 3
logo.png PNG 256×256 12.5 KB
Color: RGBA
Bit depth: 8
$ image-optimize --list
Supported Image Formats:
Format | Detection | Info Parsed
---------|-----------|---------------------------
PNG | ✓ | Dimensions, bit depth, color type
JPEG | ✓ | Dimensions, precision, components
WEBP | ✓ | Dimensions, subtype (VP8/VP8L/VP8X)Options
| Option | Alias | Description |
|--------|-------|-------------|
| --quality <1-100> | -q | Output quality (default: 80) |
| --output <dir> | -o | Output directory (default: ./optimized) |
| --verbose | -v | Show detailed image metadata |
| --list | | List supported formats |
| --help | -h | Show help |
Supported Formats
- PNG — dimensions, bit depth, color type (Grayscale/RGB/Indexed/RGBA)
- JPEG — dimensions, precision, number of components
- WEBP — dimensions, subtype (lossy VP8 / lossless VP8L / extended VP8X)
License
MIT
