Convert JPG to AVIF on Mac
Convert JPG to AVIF on Mac with avifenc or GetCompress. Use JPEG fallback in your HTML.
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.
| Format | Best for | Avoid for |
|---|---|---|
| AVIF | Site heroes, product grids | Email, print, legacy CMS |
| JPEG | Fallback, universal share | Maximum compression on modern web |
| WebP | Middle ground support | Same as AVIF for very old browsers |
| Deployment step | Action |
|---|---|
| Build static site | AVIF + JPEG in <picture> |
| Client sends JPEG only | Convert heroes, keep JPEG fallback |
| Analytics show old browsers | Keep 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 type | AVIF payoff |
|---|---|
| Photo heroes | Often 30 to 50% smaller vs JPEG |
| Flat UI screenshots | Smaller gains; test visually |
| Icons with sharp edges | May 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
| Tool | Speed | Notes |
|---|---|---|
| avifenc | Slower, tuned for AVIF | Default choice on Mac |
| FFmpeg | Depends on build | Good when you already batch video |
Large folders can run overnight on a laptop. Resize oversized heroes first so encode time drops.
--min / --max | Effect |
|---|---|
--min 20 --max 24 | Higher quality, larger files |
--min 22 --max 28 | Balanced starting point |
--min 26 --max 32 | Smaller 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.
- Convert PNG to WebP on MacConvert PNG to WebP on Mac with cwebp or GetCompress. Keep a JPEG fallback for older browsers.
- How to Compress Images on MacCompress images on Mac with Preview and Photos. Resize JPG and PNG, convert HEIC, and batch compress with GetCompress.
- For web developersBuild a repeatable PNG, JPEG, WebP, AVIF, MP4, and WebM asset pipeline that improves page weight without breaking responsive delivery or visual quality.
- Batch Convert HEIC on MacBatch convert HEIC to JPG on Mac with Terminal sips or GetCompress. Real estate and event photo workflows.
Buy GetCompress now for local media compression with reusable presets and no media upload.