getavif CLI

Convert images to AVIF from the command line.

Install

pnpm add -g getavif
# or
npm i -g getavif

Usage

getavif [options] <file...>

Options

OptionDescription
-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, --helpShow 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/*.png