@elrond25/image-processor
v1.0.5
Published
Convert images to different formats using sharp and cjxl
Maintainers
Readme
🖼️ Image Converter CLI
A powerful and flexible CLI tool to convert image files or directories of images into various formats using Sharp and cjxl for JPEG XL support.
✨ Features
- Convert single images or entire directories
- Supports output formats:
jpg,png,webp,avif,jpegxl - Optional verbose logging
- Handles overwriting with prompts (
yes,no,all,quit) - Supports output to custom directory
- Fallback to
cjxlfor JPEG XL conversion - Interactive CLI prompts for safer operations
📦 Installation
Clone this repo and install dependencies:
npm installMake sure you have cjxl installed and available in your system path for JPEG XL support.
Install cjxl
macOS (with Homebrew):
brew install jpeg-xlUbuntu/Debian:
sudo apt install libjxl-tools🧪 Usage
npx tsx src/index.ts <source> --formats <formats...> [options]🔤 Arguments
<source>: A path to an image file or directory
⚙️ Options
| Flag | Description | | --- | --- | | -f, --formats | Output format(s). Use multiple (e.g. jpg png) or "all" for all supported | | -o, --out | Output directory. Defaults to same directory as source | | --verbose | Enable detailed logging | | -h, --help | Show usage information |
