Skip to content
프로젝트

소개

Command line utility to convert images to AVIF

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

avif-cli

Command line utility to convert images to AVIF, requires a Node-API v9 compatible runtime:

  • Node.js 20.19.0+
  • Deno
  • Bun

Usage

By default, will search current directory for image files and create AVIF variants.

Exit code is non-zero if one or more errors occurred.

npm

npx avif

pnpm

pnpm dlx avif

Deno

deno run --allow-ffi --allow-read npm:avif

Bun

bun x avif

yarn

yarn dlx avif

Options

Options:
      --input               Input file name(s), supports globs/wildcards
                    [string] [default: "*.{jpg,jpeg,tif,tiff,webp,png,gif,svg}"]
      --output              Output directory, default is same directory as input
                                                          [string] [default: ""]
      --cwd                 Directory that input is relative to, defaults to
                            current working directory as reported by
                            process.cwd()
                                               [string] [default: process.cwd()]
      --quality             Quality vs file size, 1 (lowest/smallest) to 100
                            (highest/largest)             [number] [default: 50]
      --effort              CPU effort vs file size, 0 (fastest/largest) to 9
                            (slowest/smallest)             [number] [default: 4]
      --lossless            Use lossless compression  [boolean] [default: false]
      --chroma-subsampling  Set to '4:2:0' to use chroma subsampling
                         [string] [choices: "4:2:0", "4:4:4"] [default: "4:4:4"]
      --keep-metadata       Keep all metadata (EXIF, ICC, XMP, IPTC)
                                                      [boolean] [default: false]
      --overwrite           Allow existing output files to be overwritten
                                                      [boolean] [default: false]
      --append-ext          Append .avif to the file name instead of replacing
                            the current extension (foo.jpg => foo.jpg.avif)
                                                      [boolean] [default: false]
      --dry-run             Do not write any output files
                                                      [boolean] [default: false]
      --max-depth           Maximum depth to recurse into subdirectories
                                                    [number] [default: Infinity]
      --verbose             Write progress to stdout  [boolean] [default: false]
  -h, --help                Show help                                  [boolean]
      --version             Show version number                        [boolean]

Examples

npx avif --verbose
npx avif --input="**/*.{jpg,jpeg}" --output="/another/path" --overwrite
npx avif --input="images/*.*" --effort=0 --quality=30 --keep-metadata

관련 프로젝트 살펴보기

불러오는 중…