How to Convert JPG to AVIF: Shrink Images by 50% in 2026
Why Convert JPG to AVIF in 2026?
If you have run Google PageSpeed Insights recently, you have probably seen this recommendation: "Serve images in next-gen formats." That warning is PageSpeed's way of telling you to move from JPG to AVIF (or WebP) — and in 2026, AVIF is the format it recommends first.
AVIF (AV1 Image File Format) reached 94.9% global browser support in early 2026. Chrome, Firefox, Safari, and Edge all have full AVIF support. Netflix, YouTube, Shopify, and Facebook serve AVIF at massive scale. The format is no longer experimental — it is the new standard for web images, and every JPG on your website is now a performance liability.
Here is what switching from JPG to AVIF actually means:
The question is not whether to convert JPG to AVIF. The question is which method fits your workflow.
JPG vs AVIF: A Direct Comparison
Before diving into the conversion methods, here is exactly what you gain and what you should know:
| Feature | JPG | AVIF |
|---|---|---|
| File size (same quality) | Baseline | 40-60% smaller |
| Lossy compression | Yes | Yes |
| Lossless compression | No | Yes |
| Transparency (alpha channel) | No | Yes |
| HDR support | Limited | Yes |
| Animation | No | Yes |
| Browser support | Universal | 94.9% (all modern browsers) |
| Color depth | 8-bit | 8-bit, 10-bit, 12-bit |
| Year standardized | 1992 | 2019 |
| Google PageSpeed recommendation | No | Yes (first choice) |
The one caveat: AVIF encoding is computationally heavier than JPG or WebP encoding. On very old devices or when processing thousands of images simultaneously, you may notice encoding takes slightly longer. For browser-based conversion of individual files or batches up to a few hundred images, this difference is negligible.
For a broader look at how AVIF compares to the full landscape, see our AVIF vs WebP vs JPEG comparison.
Method 1: Convert JPG to AVIF in Your Browser (Free, Private, Instant)
The fastest method with zero privacy risk: PhotoFormatLab's JPG to AVIF converter runs entirely in your browser. Your images are never uploaded to any server.
Step-by-Step Instructions
The entire process happens offline. No files travel across the internet. No account required. No file size limits imposed by server quotas.
Why Browser-Based Conversion Matters for Privacy
Every traditional online converter — CloudConvert, Convertio, FreeConvert — uploads your images to their servers. Your files pass through third-party infrastructure, get processed on machines you do not control, and are typically stored for hours or days before deletion (if deletion happens at all).
Browser-based conversion using WebAssembly eliminates this entirely. The conversion library runs locally. Your JPG files are read into browser memory, processed, and written out as AVIF — all on your device. The server never sees your images. This matters particularly for:
For a full explanation of how browser-based conversion works technically, see our guide on converting images without uploading to a server.
Batch Conversion
Converting an entire product catalog or photo album? Use our batch JPG to AVIF converter. Drop an entire folder, and all JPG files are converted simultaneously — still entirely in your browser, still completely private.
Method 2: Convert JPG to AVIF on Mac (Command Line)
macOS does not natively export to AVIF through Preview or built-in tools as of early 2026. For local command-line conversion, the best options are:
Using FFmpeg
FFmpeg is widely installed on developer machines and handles AVIF output via the libaom encoder:
```bash
# Install on macOS with Homebrew
brew install ffmpeg
# Convert a single JPG to AVIF
ffmpeg -i input.jpg -c:v libaom-av1 -crf 30 -b:v 0 output.avif
# Batch convert all JPGs in a directory
for f in *.jpg; do ffmpeg -i "$f" -c:v libaom-av1 -crf 30 -b:v 0 "${f%.jpg}.avif"; done
```
The -crf flag controls quality (0-63, lower = better quality). A value of 23-30 is equivalent to JPG quality 85-90. At -crf 30, most AVIF files will be 40-55% smaller than the source JPG with no perceptible quality difference.
Warning: libaom-av1 encoding is slow. For large batches on a standard laptop, expect encoding times of 2-10 seconds per image depending on resolution. If speed matters more than the absolute smallest file size, consider SVT-AV1:
```bash
# Faster encoding with SVT-AV1 (if FFmpeg is built with it)
ffmpeg -i input.jpg -c:v libsvtav1 -crf 30 output.avif
```
Using ImageMagick (version 7.1+)
ImageMagick added AVIF support in version 7.1. Check your version with magick --version:
```bash
# Install ImageMagick with AVIF support
brew install imagemagick
# Convert single file
magick input.jpg -quality 80 output.avif
# Batch convert
magick mogrify -format avif -quality 80 *.jpg
```
Note: ImageMagick's AVIF quality scale maps differently than FFmpeg's -crf. A quality of 75-85 in ImageMagick produces results comparable to JPG quality 85-90.
Method 3: Convert JPG to AVIF on Windows
Using FFmpeg (Windows)
FFmpeg is available for Windows and works identically to the macOS instructions above:
ffmpeg commands shown in the Mac section aboveUsing Squoosh (Google's Browser Tool)
Squoosh.app is Google's browser-based image optimizer and supports AVIF output:
Squoosh processes files in your browser (no upload), similar to PhotoFormatLab. However, it converts one file at a time. For batch conversion, PhotoFormatLab's batch converter handles multiple files simultaneously.
Using Microsoft Paint or Photos
Neither Windows Paint nor the Photos app currently support AVIF export as of early 2026. For local Windows conversion without installing tools, the browser-based options (PhotoFormatLab, Squoosh) are the most practical.
Method 4: Convert JPG to AVIF for WordPress
WordPress has supported AVIF uploads since version 6.5 (April 2024). If you are running a current WordPress installation, you can:
Recommended WordPress plugins for JPG-to-AVIF conversion:
element with JPG fallback for old browsers. Handles existing media library images.WordPress plugins process images server-side, which means your server needs enough CPU to handle AVIF encoding. On shared hosting with resource limits, large batch processing may be throttled. If your host is slow, convert images with PhotoFormatLab before uploading — then your media library holds native AVIF files from day one, with no server-side encoding needed.
For a complete WordPress image optimization workflow, read our guide on optimizing images for WordPress.
JPG to AVIF vs JPG to WebP: Which Should You Choose?
Both AVIF and WebP are significant improvements over JPG. Here is how to decide:
| Scenario | Recommended Format | Reason |
|---|---|---|
| Maximum compression, modern audience | AVIF | 40-60% smaller than JPG vs WebP's 25-35% |
| Widest browser compatibility | WebP | 97%+ support vs AVIF's 94.9% |
| Simple, fast encoding | WebP | cwebp encodes 5-10x faster than libaom AVIF |
| Images with fine text or gradients | AVIF | Better at preserving fine detail at high compression |
| Animated images | WebP | Broader animation support ecosystem |
| New website, modern stack | AVIF | Future-proof, Google's top recommendation |
The practical recommendation for most use cases in 2026: serve AVIF with a WebP fallback. This gives modern browsers (94.9%) the best compression while ensuring older browsers receive a still-optimized WebP instead of falling back all the way to JPG.
In HTML, the element handles this automatically:
```html

```
For a deep comparison of these two formats, read our AVIF vs WebP guide.
Choosing the Right AVIF Quality Setting
AVIF quality settings work differently than JPG quality settings, and confusing them leads to either over-compressed files or missed savings.
| Quality (PhotoFormatLab) | Equivalent JPG Quality | File Size vs JPG | Best For |
|---|---|---|---|
| 90-95 | ~98 | 20-30% smaller | Archival, professional work |
| 75-85 | ~90-92 | 40-50% smaller | General web use, product photography |
| 60-75 | ~85 | 50-60% smaller | Blog images, thumbnails |
| 45-60 | ~75-80 | 60-70% smaller | Low-priority background images |
| Below 45 | ~65 | 70%+ smaller | Only when minimum file size is required |
The recommended default is 80% quality, which produces AVIF files that are roughly 45-55% smaller than JPG at equivalent perceived quality. This is the sweet spot for the vast majority of web images.
One counterintuitive detail: AVIF at quality 70 often looks better than JPG at quality 85, because AVIF's compression algorithm better preserves perceptual sharpness while eliminating data the human eye cannot detect.
Step-by-Step: Converting Your Website's JPG Images to AVIF
If you are tackling a full website migration from JPG to AVIF, here is a systematic approach:
Step 1: Audit Your Existing JPG Images
Before converting, identify which images matter most:
Step 2: Convert in Priority Order
Use PhotoFormatLab's batch converter to process images by category. Start with hero images and product photos where the PageSpeed impact will be most visible.
Step 3: Implement With Fallback
Use the element pattern shown earlier. Never serve AVIF without a fallback — that 5.1% of browsers without AVIF support still deserves a working image.
Step 4: Verify with PageSpeed Insights
After deploying AVIF images, run PageSpeed Insights again. The "serve images in next-gen formats" warning should disappear. LCP times for image-heavy pages will typically improve by 0.2-0.8 seconds.
Step 5: Update Your Upload Workflow
Configure your CMS or CDN to accept and serve AVIF files. If you are on WordPress, install an AVIF-aware optimization plugin so new uploads are automatically handled. If you are on a CDN like Cloudflare Images or Imgix, enable AVIF serving in your account settings.
Frequently Asked Questions
Does converting JPG to AVIF lose quality?
At the quality settings used for typical web images (quality 75-85 in PhotoFormatLab), the visual difference between the original JPG and the AVIF output is imperceptible to the human eye. AVIF's compression algorithm is more efficient than JPG's, meaning it can achieve smaller files while preserving more perceptual detail — not less. If you need zero quality loss, AVIF also supports lossless compression, though lossless AVIF files are typically larger than lossless PNG.
Can I convert JPG to AVIF for free?
Yes. PhotoFormatLab's JPG to AVIF converter is completely free with no file size limits, no watermarks, and no account required. Command-line tools like FFmpeg and ImageMagick are also free and open source. The WordPress plugins mentioned above have free tiers with monthly conversion limits.
Is AVIF supported on all browsers?
AVIF has 94.9% global browser support as of early 2026. Chrome (since version 85), Firefox (since version 93), Safari (since version 16), and Edge (since version 121) all support AVIF. Internet Explorer does not, but IE usage is effectively zero on modern web analytics. For the remaining ~5% of users, always provide a WebP or JPG fallback using the element.
How much smaller will my AVIF files be compared to my JPGs?
For photographic images at equivalent perceived quality, expect AVIF files to be 40-60% smaller than JPG. The exact savings depend on image content. Images with smooth gradients (skies, portraits) compress very well in AVIF. Images with random noise or fine textures compress less dramatically, but still significantly better than JPG. Run a few test conversions on your specific images to get accurate estimates.
Can I convert AVIF back to JPG?
Yes, absolutely. Use PhotoFormatLab's AVIF to JPG converter to reverse the conversion. Note that converting AVIF back to JPG means the output JPG will go through another round of lossy compression — converting the same image from JPG to AVIF and back to JPG will degrade quality slightly compared to the original. Whenever possible, keep originals and only distribute converted versions.
Does AVIF work with my CDN?
Most major CDNs support AVIF serving. Cloudflare, Fastly, BunnyCDN, and Imgix all support AVIF. AWS CloudFront passes through AVIF files correctly. If you are using a WordPress caching plugin, check its documentation for AVIF support — most major plugins (WP Rocket, W3 Total Cache, LiteSpeed Cache) have added AVIF support in recent versions.