Skip to content

Convert JPG to AVIF on Mac

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

By Petr Samokhin

Your marketing site ships hero JPEG files that Lighthouse flags as oversized. AVIF often cuts bytes on modern browsers without visible loss on photos. It is not for email attachments or slides: support is browser-first. The practical workflow is bulk convert heroes before deploy, keep JPEG fallbacks in <picture>, and measure real traffic before dropping legacy formats. Treat AVIF as a delivery optimization layer, not a replacement for every asset in your CMS.

What AVIF is for

AVIF targets web delivery. Email clients, 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 supportSame as AVIF for very old browsers
Deployment stepAction
Build static siteAVIF + JPEG in <picture>
Client sends JPEG onlyConvert heroes, keep JPEG fallback
Analytics show old browsersKeep fallback until traffic drops

Check analytics before removing JPEG fallbacks. For general image compression beyond format swap, see how to compress images on Mac . For another modern web format, see PNG to WebP on Mac .

Content typeAVIF payoff
Photo heroesOften 30 to 50% smaller vs JPEG
Flat UI screenshotsSmaller gains; test visually
Icons with sharp edgesMay need higher quality settings

Convert with avifenc

Open Terminal (Applications → Utilities → Terminal). Install libavif through Homebrew (install Homebrew first if brew is not found):

brew install libavif

Single file:

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

Batch loop:

mkdir avif-out
for f in *.jpg *.jpeg; do
  [ -f "$f" ] || continue
  avifenc --min 22 --max 28 "$f" "avif-out/${f%.*}.avif"
done

FFmpeg alternative (when built with libavif):

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

Large folders can run overnight on a laptop. Resize oversized heroes first so encode time drops.

--min / --maxEffect
--min 20 --max 24Higher quality, larger files
--min 22 --max 28Balanced starting point
--min 26 --max 32Smaller thumbs, check banding

avifenc speed depends on CPU; laptop fans spinning for an hour is normal on 200 heroes. Split batches by folder (heroes/, thumbs/) so you can deploy heroes first and encode thumbs overnight.

Resize in Preview first

Oversized JPEG heroes waste encode time. Preview → Tools → Adjust Size, export a working JPEG, then run avifenc on that file.

Target display width times 2 for Retina (for example 1600 px wide hero → 3200 px source max). Going far beyond display size rarely helps AVIF size on the wire.

Compare file sizes against the source JPEG on three representative images (photo, gradient hero, screenshot) before you bulk-convert a whole marketing folder. AVIF wins most on photos; flat UI screenshots sometimes shrink less.

sips -Z 2400 hero.jpg --out hero-resized.jpg
avifenc --min 22 --max 28 hero-resized.jpg hero.avif

HTML <picture> pattern reminder: serve AVIF first, JPEG fallback second, same dimensions in both sources to avoid layout shift. Keep original JPEG masters in your repo for editors who still work in JPEG only.

Using GetCompress

GetCompress fits convert JPG to AVIF on Mac when avifenc loops are too slow to babysit or when you want quality sliders instead of guessing --min and --max 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 full marketing asset folder before deploy night.
  • Presets: save “hero AVIF q80” vs “thumbnail AVIF q70”.
  • Resize plus convert: cap width and change format in one pass.
  • Local processing: keep unreleased campaign art off upload converters.
  • Side-by-side preview: confirm photos still look acceptable before you push static files.
  • Folder monitoring: auto-convert new hero JPEG drops before deploy night.

Keep JPEG fallbacks in HTML for browsers that skip AVIF. After deploy, spot-check Lighthouse and real device loads, not just file size on disk. Save separate presets for heroes vs thumbnails so one aggressive setting does not crush product grid images.

Marketing teams shipping static sites from Astro or Hugo can bulk-drop hero folders into GetCompress before pnpm build, encode AVIF overnight, and commit both AVIF and JPEG pairs. Local processing keeps embargo campaign art off upload converters while CI still receives optimized binaries.

Thumbnail grids need a separate preset from heroes: lower quality and smaller max width prevent over-encoding icons that display at 200 px in the product UI but were exported as 4000 px JPEG sources.

Store AVIF in public/ or your CDN path and keep JPEG masters in a private assets-source/ folder. Editors who still work in JPEG should not open AVIF in Photoshop; they edit JPEG, you encode AVIF at deploy time.

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