Skip to content

Convert JPG to AVIF on Windows

Convert JPG to AVIF on Windows with avifenc or GetCompress. Use JPEG fallback in your HTML.

By Petr Samokhin

Your marketing site ships hero JPEG files that performance audits flag as oversized. AVIF often cuts bytes on modern browsers without visible loss on photos. It is not for email or slides: support is browser-first. The workflow is bulk convert heroes before deploy, keep JPEG fallbacks in <picture>, and check analytics before dropping legacy formats. Deploy AVIF only where your HTML already serves a JPEG fallback for older clients.

What AVIF is for

AVIF targets web delivery. Email, old CMS uploads, and many social tools still want JPEG or PNG.

FormatBest forAvoid for
AVIFSite heroes, product gridsEmail, print, legacy CMS
JPEGFallback, universal shareMaximum compression on modern web
WebPMiddle ground supportVery old browsers
Deployment stepAction
Build static siteAVIF + JPEG in <picture>
Client sends JPEG onlyConvert heroes, keep fallback
Analytics show old browsersKeep JPEG until traffic drops

For general compression beyond format swap, see how to compress images on Windows . For another modern web format, see PNG to WebP on Windows .

AssetBefore bulk convert
6000 px camera JPEGResize to display width × 2
Gradient heroCompare banding at q80 vs q85
Product grid thumbSeparate preset from full hero

Convert with avifenc

Open Command Prompt or PowerShell. Install libavif with winget:

winget install libavif

Single file:

avifenc --min 22 --max 28 photo.jpg photo.avif

Batch:

mkdir avif-out
Get-ChildItem *.jpg, *.jpeg | ForEach-Object {
  avifenc --min 22 --max 28 $_.Name "avif-out\$($_.BaseName).avif"
}

FFmpeg alternative:

ffmpeg -i photo.jpg -c:v libaom-av1 -crf 30 photo.avif
ToolSpeedNotes
avifencSlower, tuned for AVIFDefault on Windows CLI
FFmpegDepends on buildGood when you batch video too

Large folders can run overnight. Resize heroes first.

Batch tipWhy
Encode thumbs separatelyFaster deploy of critical heroes
Keep source JPEGEditors and fallbacks still need it
Spot-check bandingGradients show artifacts before photos do

FFmpeg batch resize before avifenc when every source is oversized:

Get-ChildItem *.jpg | ForEach-Object {
  ffmpeg -i $_.Name -vf scale=2400:-2 "resized\$($_.BaseName).jpg"
}

Run avifenc on resized\ output, not full-resolution camera exports. A 6000 px JPEG rarely helps web AVIF if the hero displays at 1200 px wide.

Resize in Photos first

In Photos, open the image, … → Resize image, save a smaller JPEG, then run avifenc.

Or use FFmpeg resize in one step:

ffmpeg -i hero.jpg -vf scale=2400:-2 hero-resized.jpg
avifenc --min 22 --max 28 hero-resized.jpg hero.avif

Target display width times 2 for high-DPI screens.

Compare output size against source JPEG on a photo, a gradient hero, and a UI screenshot before bulk deploy. AVIF helps photos most; flat screenshots sometimes gain less.

Deploy with <picture>: AVIF source first, JPEG fallback second, matching width and height attributes to avoid layout shift in your static site build.

Using GetCompress

GetCompress fits convert JPG to AVIF on Windows when avifenc loops are too slow or you want quality sliders instead of CLI flags.

Drop a folder of JPEG heroes into the app. Choose AVIF output, set quality, optional max width, and export.

Workflow features that help:

  • Batch queue: convert a marketing folder before deploy.
  • Presets: save “hero AVIF” vs “thumbnail AVIF” settings.
  • Resize plus convert: cap width and change format together.
  • Local processing: keep unreleased campaign art off online converters.
  • Preview: confirm photos before you push static files.
  • Batch queue: entire marketing folder before Friday deploy.

Keep JPEG fallbacks in HTML. Spot-check Lighthouse and real devices after deploy. Document which preset you used for heroes vs thumbnails so the next deploy does not guess --min and --max values again.

On Windows, long avifenc runs can starve other apps during work hours. Queue large marketing folders in GetCompress with batch presets, let the encode finish locally, then copy avif-out\ into your static site repo alongside unchanged JPEG fallbacks. Same workflow as Mac without babysitting PowerShell overnight.

Verify one gradient hero in Chrome and Safari before bulk deploy. AVIF banding shows up on soft backgrounds before it shows on product photos; adjust quality on that preset before encoding the full folder.

Winget avifenc and GetCompress can coexist on the same PC: use CLI for one-off tests, GetCompress when marketing drops fifty heroes every sprint and needs width caps without editing PowerShell loops each time.

Static site generators on Windows often run pnpm build in CI while designers encode locally. Drop the hero folder into GetCompress on a workstation, commit AVIF + JPEG pairs to git, and let CI deploy without installing libavif on every build agent unless you prefer encode-at-build time.

Compare byte sizes on disk against Lighthouse “serve images in next-gen formats” after deploy. The audit cares about transferred bytes, not whether you used avifenc or GetCompress to produce the files.

Buy GetCompress now for local media compression with reusable presets and no media upload.