getavif CLI
Convert images to AVIF from the command line.
Install
pnpm add -g getavif
# or
npm i -g getavifUsage
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.jpgMultiple files, custom output dir and quality
getavif -o ./out -q 85 a.jpg b.png c.webpResize to 1024px width
getavif -w 1024 large.jpgParallel conversion with 4 workers
getavif --workers 4 -q 80 ./images/*.png