Skip to content
Back to Blog
How-To

How to Convert JPG to AVIF: Shrink Images by 50% in 2026

April 11, 202610 min read

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:

  • 40-60% smaller files at the same visual quality. A 500 KB JPG typically becomes 200-300 KB as AVIF. Across a website with hundreds of images, that difference is measured in gigabytes of saved bandwidth per month.
  • Better compression, not worse quality. AVIF uses the AV1 video codec, which was designed with over a decade of research beyond JPEG's 1992 algorithms. It extracts more redundancy from photographic data without introducing the blocky artifacts JPG shows at moderate compression.
  • Direct impact on Core Web Vitals. Smaller images load faster. Faster images mean better Largest Contentful Paint (LCP). Better LCP means better search rankings. The chain from image format to Google ranking is direct and measurable.
  • Lossless and lossy modes. Unlike JPG, AVIF supports lossless compression — pixel-perfect preservation for graphics and screenshots — while still delivering excellent lossy compression for photographs.
  • Transparency and HDR support. AVIF supports alpha channels (like PNG) and HDR color data (like HEIC). For most JPG-to-AVIF conversions you will not use these, but they make AVIF the only format that truly replaces every other format in one tool.
  • 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:

    FeatureJPGAVIF
    File size (same quality)Baseline40-60% smaller
    Lossy compressionYesYes
    Lossless compressionNoYes
    Transparency (alpha channel)NoYes
    HDR supportLimitedYes
    AnimationNoYes
    Browser supportUniversal94.9% (all modern browsers)
    Color depth8-bit8-bit, 10-bit, 12-bit
    Year standardized19922019
    Google PageSpeed recommendationNoYes (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

  • Open PhotoFormatLab.com/jpg-to-avif in Chrome, Firefox, Safari, or any modern browser
  • Drag and drop your JPG files onto the converter area, or click to open the file picker
  • Adjust the quality slider if needed — the default of 80% is optimized for AVIF (equivalent to JPG at 90%)
  • Click Convert — conversion happens locally using your device's processor
  • Download your AVIF files individually, or click Download All to get a ZIP archive
  • 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:

  • Client photos and confidential business images
  • Medical or legal documents with embedded photographs
  • Personal photos you would not post publicly
  • Images containing location data or identifying metadata
  • 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:

  • Download FFmpeg from the official site and add it to your PATH
  • Open PowerShell or Command Prompt
  • Run the same ffmpeg commands shown in the Mac section above
  • Using Squoosh (Google's Browser Tool)

    Squoosh.app is Google's browser-based image optimizer and supports AVIF output:

  • Open Squoosh.app in Chrome
  • Drop your JPG file onto the page
  • In the right panel, change the format to AVIF
  • Adjust quality settings and download
  • 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:

  • Upload AVIF files directly to your media library
  • Use an optimization plugin to auto-convert JPG uploads to AVIF
  • Recommended WordPress plugins for JPG-to-AVIF conversion:

  • ShortPixel: Converts uploads to AVIF and serves them via element with JPG fallback for old browsers. Handles existing media library images.
  • Imagify: Similar to ShortPixel — converts on upload and optimizes your entire existing library.
  • EWWW Image Optimizer: Generates AVIF versions alongside originals; you control which format is served.
  • 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:

    ScenarioRecommended FormatReason
    Maximum compression, modern audienceAVIF40-60% smaller than JPG vs WebP's 25-35%
    Widest browser compatibilityWebP97%+ support vs AVIF's 94.9%
    Simple, fast encodingWebPcwebp encodes 5-10x faster than libaom AVIF
    Images with fine text or gradientsAVIFBetter at preserving fine detail at high compression
    Animated imagesWebPBroader animation support ecosystem
    New website, modern stackAVIFFuture-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

    Description

    ```

    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 QualityFile Size vs JPGBest For
    90-95~9820-30% smallerArchival, professional work
    75-85~90-9240-50% smallerGeneral web use, product photography
    60-75~8550-60% smallerBlog images, thumbnails
    45-60~75-8060-70% smallerLow-priority background images
    Below 45~6570%+ smallerOnly 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:

  • Hero images and above-the-fold content (highest LCP impact)
  • Product photos (most viewed, highest value per conversion)
  • Blog thumbnails and article images (high volume)
  • Background images and decorative elements (can tolerate more compression)
  • 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.

    Ad
    Ad