getavif
v1.0.1
Published
Convert images to AVIF from the command line.
Readme
getavif-cli
Convert images to AVIF from the command line.
Install
pnpm add -g getavif-cli
# or
npm i -g getavif-cliFrom source:
git clone <repo> && cd getavif-cli
pnpm install && pnpm build
pnpm link --globalUsage
getavif [options] <file...>Options
| Option | Description |
|--------|-------------|
| -o, --out <dir> | Output directory (default: same as input file) |
| -q, --quality <1-100> | Quality (default: 80) |
| -w, --width <px> | Resize by width (optional) |
| --workers <n> | Use worker pool with N workers (default: single-thread) |
| -h, --help | Show help |
Examples
# Single file
getavif photo.jpg
# Multiple files, custom output dir and quality
getavif -o ./out -q 85 a.jpg b.png c.webp
# Resize to 1024px width
getavif -w 1024 large.jpg
# Parallel conversion with 4 workers
getavif --workers 4 -q 80 ./images/*.pngLicense
MIT
