Photography Articles

Convert PNG to AVIF: Reduce File Size & Preserve Quality

Convert PNG to AVIF with tested avifenc settings, real file-size results, and checks for lossless pixels, transparency, metadata and compatibility.

Published June 26, 2026 Updated October 5, 2026 14 min read

Table of Contents

Why Photographers Should Care About AVIF

PNG to AVIF conversion is useful when a smaller viewing copy matters more than keeping the PNG file unchanged. Choose an encoder, convert copies, then compare dimensions, pixels, transparency and metadata. Keep the PNG or editing master: a smaller AVIF is not automatically an equivalent archive.

This guide uses avifenc 1.4.2 with libaom 3.15.0. Its color quality runs from 0 to 100, with higher values meaning higher quality. That is a different control from FFmpeg's libaom CRF, which runs from 0 to 63 in the opposite direction. Commands and a three-image conversion batch below were checked on October 5, 2026.

PNG is clean, but often too heavy

PNG preserves raster samples without lossy compression, making it useful for screenshots, transparency and intermediate exports. A photographic PNG can be large because its compression does not discard texture or noise. AVIF offers a different size/quality tradeoff, but not a guaranteed percentage saving. The input, encoder, settings and metadata all affect the result.

Compare the final viewing dimensions first. Converting an unnecessarily large image without resizing still leaves more pixels to decode. Resize an exported copy when appropriate, and keep the full-resolution master separately.

AVIF fits the delivery end of the workflow

Use AVIF as a viewing derivative for a website that serves it correctly, with another format available where needed. A browser's ability to decode AVIF does not establish that a gallery service uploads, processes, previews and downloads an AVIF original unchanged. This guide does not promise that pipeline for SendPhoto.

For a photograph without transparency, compare AVIF against a sensible JPEG export too. PNG is not always the right baseline for normal client photo downloads. Our CR2 to PNG guide explains how an exported PNG differs from the camera RAW master.

Deciding When to Convert PNG to AVIF

Start with the destination and the reader's job. A portfolio preview, a transparent logo and a lab print file have different requirements, even if they begin as PNGs.

Good candidates for conversion

  • Web photographs: finished viewing copies where file size matters and a fallback can be served.
  • Transparent graphics: logos or overlays whose alpha edges can be checked after conversion.
  • Screenshots: compare text and colored edges at actual size; a smaller output alone does not make it acceptable.
  • Repeated web exports: batches that benefit from a recorded, repeatable encoder command.

Files that should stay out of AVIF

  • Editing masters: retain RAW files and layered documents rather than replacing them with a flattened AVIF.
  • Exact-pixel assets without verification: keep PNG when a lossy change is unacceptable and you have not established a lossless round trip.
  • Files for a named lab or print service: use that provider's accepted format, dimensions, profile and bit-depth instructions.
  • Files for an app or platform that does not accept AVIF: supply its requested format, regardless of browser support.

This is a workflow decision, not a universal ban on printing AVIF. An application or service must accept the file and interpret its color information correctly.

A practical decision filter

DestinationAVIF decisionKeep or supply separately
Website viewingCompare a small batch and confirm the site serves itJPEG or PNG fallback
Transparent graphicVerify alpha and edge colors; compare lossless sizeOriginal PNG
Print or third-party editingFollow the recipient's specificationRequested JPEG, TIFF, PNG or other format
Long-term masterUse AVIF only as an additional derivativeRAW, layered source or verified lossless original
  • Write the intended use into the export folder name.
  • Keep input and output folders separate.
  • Compare a photograph, a transparent asset and fine text before committing to a batch.
  • Retain an alternate format when the recipient's software is uncertain.

Optimal AVIF Encoding Settings for Image Quality

Name the tool before choosing a quality number. The avifenc 1.4.2 manual documents its separate color and alpha quality controls. The following starting points use that encoder; they are not universal presets for other apps.

When lossless preserves the source samples

True lossless AVIF encoding is possible. In our batch, --lossless produced exact decoded RGB samples for all three 8-bit inputs and exact alpha samples for the transparent logo. Lossless image samples do not mean that every metadata field, PNG chunk or editing feature survives.

Color transforms, chroma subsampling, precision changes and premultiplied alpha can affect a round trip. Do not equate an arbitrary app's “quality 100” with exact original pixels. With avifenc, use its dedicated lossless mode, read any warnings, and compare decoded samples at the input's precision. The 8-bit checks here do not establish preservation of 16-bit PNGs or HDR assets.

Useavifenc color qualitySpeed used hereChroma / alphaDecision after encoding
Photograph viewing copy--qcolor 80; compare 90--speed 6--yuv 444 --qalpha 100Inspect texture, gradients and file size
Transparent graphicCompare 80, 90 and lossless6444; alpha quality 100Check alpha separately from color
Screenshot or fine textCompare 80, 90 and lossless6444; alpha quality 100 if presentInspect text and colored edges at 100%
Exact-sample candidate--lossless, not just a quality number6Use lossless defaults; check warningsDecode and compare samples; keep PNG if larger

These settings were run, not declared optimal for every image. The test held the codec, speed and chroma constant for quality 80/90 comparisons. Other settings may produce a better result for your files. Alpha quality 100 does not make the RGB color channels lossless.

FFmpeg's libaom documentation defines CRF on a 0–63 scale: higher means lower quality and usually a smaller file. Do not enter the table's 80 or 90 into a CRF field.

Transparency needs deliberate testing

  • Confirm the output still contains an alpha channel.
  • Compare the alpha values separately from the RGB colors.
  • View soft and hard edges against both light and dark backgrounds.
  • Look for halos, changed edge colors and accidental flattening.

Our existing 560 × 560 SendPhoto logo remained transparent with --qalpha 100, and every decoded alpha value matched. Quality 80 still changed RGB samples: exact alpha is not proof of exact edge color. The lossless logo preserved both, but grew from 74,902 to 85,022 bytes.

Original transparent SendPhoto logo used as the PNG input
Existing transparent PNG logo, 74,902 bytes. This is the actual input, not a converter screenshot.
AVIF quality 80 conversion of the same transparent SendPhoto logo
Actual quality-80 AVIF output, 45,422 bytes, with alpha quality 100 and 4:4:4 chroma. The alpha samples matched; RGB samples changed. Compare the exact-sample lossless output.

Practical Methods for PNG to AVIF Conversion

Choose a method that makes its settings, output location and metadata behavior clear. Only the avifenc commands and batch in this guide were executed; the app notes below are based on the linked documentation.

Online converters for quick one-off jobs

An online converter can be convenient for a public, non-sensitive asset. Do not assume the file stays in your browser: check whether it is uploaded, the provider's retention terms and whether you have permission to send it there.

  1. Use a copy and select AVIF explicitly.
  2. Read the tool's quality scale, transparency and metadata options; do not translate our numbers by guesswork.
  3. Download to a separate folder and inspect the actual file, dimensions and required metadata.

If the service gives no useful description of its settings or handling, a local converter is easier to audit. This article does not endorse an untested online provider.

Desktop apps for better control

Check the installed version and the specific save/export dialog. Opening AVIF and exporting AVIF are separate capabilities.

  1. Photoshop: Adobe's supported-format list includes AVIF, while its Export As instructions list PNG, JPG, GIF and SVG. That does not establish an AVIF Export As workflow. Check your actual version/dialog, or export PNG and convert locally.
  2. Affinity Photo 2: its official import/export table does not list AVIF. Do not assume native AVIF export; a PNG copy can be converted with the tested command below.
  3. A dedicated desktop converter: for tools such as XnConvert, verify AVIF output in your installed build before using batch processing. Use a separate destination and inspect one result before converting everything.

Documentation checked October 5, 2026. We did not run Photoshop, Affinity or XnConvert for this guide.

Command line tools for bulk delivery

Install a libavif build with the avifenc and avifdec programs and an AOM encoder. Run avifenc --version and avifenc --help to confirm the available codec and options. Our build used libavif 1.4.2, libaom 3.15.0, two worker threads and speed 6.

  1. Place copies in an input folder; retain the masters elsewhere.
  2. Encode one file and read the encoder's output for warnings.
  3. Compare the decoded output and required metadata.
  4. Run a batch only after the sample is acceptable, retaining the command and results.

For a lossy viewing copy of an 8-bit PNG:

avifenc --codec aom --jobs 2 --speed 6 --no-overwrite --qcolor 80 --qalpha 100 --yuv 444 input.png output-q80.avif

For a lossless candidate, keep a different output name:

avifenc --codec aom --jobs 2 --speed 6 --no-overwrite --lossless input.png output-lossless.avif

Decode an 8-bit output for a pixel comparison:

avifdec --depth 8 output-lossless.avif decoded-lossless.png

The encoder leaves the input unchanged and --no-overwrite refuses an existing output. These are the options used for the results below, with the actual input/output paths substituted. Decoding a lossy AVIF does not restore discarded information. For a higher-precision source, do not use this 8-bit comparison as proof of losslessness.

For a Bash batch of top-level PNG copies, the following loop uses the same tested encoding settings. It stops on an encoder failure, quotes filenames and avoids replacing existing outputs; the loop was also run on the same three copies, producing byte-identical outputs to their individual quality-80 runs. This is a small local batch, not a production throughput test.

mkdir -p avif-output
for input in ./png-input/*.png; do
    [ -f "$input" ] || continue
    name=$(basename "$input" .png)
    avifenc --codec aom --jobs 2 --speed 6 --no-overwrite --qcolor 80 --qalpha 100 --yuv 444 "$input" "avif-output/$name.avif" || break
done

This handles lowercase .png files directly inside png-input. It does not recurse or remove the inputs.

Which method fits which photographer

MethodUseful whenWhat to establish first
Online converterA permitted, non-sensitive one-off fileUpload/retention handling, quality scale and metadata
Desktop appYou want a local dialog or batch interfaceInstalled-version AVIF export support and output settings
avifenc command lineYou need repeatable settings and recorded resultsBuild/codec availability and a verified sample

How to Preserve Metadata and Verify Transparency

Pixel equality, alpha equality and metadata preservation answer different questions. A “lossless” image can still be the wrong delivery file if a required profile or credit field disappears.

What usually goes wrong

A converter may strip metadata, change a profile or precision, flatten transparency, or preserve alpha while altering RGB edge colors. Check the fields your workflow needs instead of assuming all metadata transfers.

  • Keep the master and its metadata, even when the viewing copy is intentionally stripped.
  • Compare embedded ICC profile payloads, not just the profile name.
  • Inspect relevant EXIF, IPTC and XMP fields before and after conversion.
  • Remove private location or identifying metadata deliberately when appropriate; do not rely on accidental stripping.

In our batch, the photograph's EXIF capture date remained 2008:05:23 14:51:02. Its ICC profile and the logo's ICC profile were byte-identical after each conversion. The input screenshot had no embedded ICC profile. None of these inputs had IPTC, XMP, Artist or Copyright fields in our targeted scan, so this batch does not establish their transfer.

ExifTool can inspect selected fields in both formats:

exiftool -G1 -Artist -Copyright -DateTimeOriginal -ImageDescription -IPTC:All -XMP:All -ICC_Profile:ProfileDescription input.png output-q80.avif

If a required field is absent, preserve it through a documented metadata workflow or use a delivery format that retains it. Embedding rights information does not prevent copying.

A simple verification routine

  1. Count and identify files: make sure each intended input has an output and the dimensions are correct.
  2. Compare at actual size: inspect fine text, texture and gradients; do not judge only a scaled preview.
  3. Verify transparency: compare alpha and inspect edges on light and dark backgrounds.
  4. Check required metadata: compare profiles and the specific fields that were present in the input.
  5. Try the intended destination: browser rendering and an app's AVIF import/export support are separate questions.

Measured results from three real PNGs

On October 5, 2026, we encoded an existing canal photograph (1200 × 798), a transparent SendPhoto logo (560 × 560) and an existing gallery screenshot (1440 × 1000). Each was tested at color quality 80 and 90 with alpha quality 100, 4:4:4 chroma and speed 6, then with --lossless at speed 6. We decoded with avifdec at 8-bit depth and compared every RGB and alpha sample. These are three files, not a representative compression benchmark.

Actual inputPNG bytesQ80 AVIF bytesQ90 AVIF bytesLossless AVIF bytes
Canal photograph1,529,301180,440285,2541,409,431
Transparent logo74,90245,42248,14285,022
Gallery screenshot1,747,955205,447311,0881,572,163

The photograph's quality-80 file was 88.2% smaller; its lossless file was only 7.8% smaller. The lossless logo was 13.5% larger. All three lossless outputs matched the decoded RGB/alpha samples exactly; every quality-80/90 output changed RGB samples. The transparent logo's alpha values matched at both lossy settings. This does not prove identical appearance in every color-managed app or metadata retention beyond the checks described above.

Original 1200 by 798 canal photograph used as the PNG conversion input
Actual PNG input, 1,529,301 bytes, reused from our CR2 to PNG conversion example. The source RAW is a Canon EOS 350D sample from raw.pixls.us, released under CC0. It is not client work.
Actual AVIF quality 80 output of the same canal photograph
Actual AVIF quality-80 output, 180,440 bytes. Inspect both at full size rather than treating this scaled view as proof of identical pixels. Download the lossless candidate for comparison.

As checked October 5, 2026, MDN's image-format guide lists AVIF support in current Chrome, Edge, Firefox, Opera and Safari. This is a browser-support statement, not a claim that 95% of your clients can use the file in their editing, printing or native photo apps.

Keep JPEG or PNG available when the recipient or delivery platform needs it. On a website you control, an HTML picture element can offer AVIF with a JPEG/PNG fallback; the server must also deliver the correct image type.

Where AVIF fits in delivery

  1. Archive: retain the full-quality source and required metadata.
  2. Viewing: publish an AVIF derivative only where the website or service supports its processing and display.
  3. Download or print: provide the format agreed with the recipient, with a fallback when needed.

For a gallery platform, check accepted uploads, generated previews and allowed downloads separately; an accepted extension alone does not establish an unchanged AVIF download. For general delivery choices, compare client photo delivery platforms against the files your clients actually need.

What to say to clients

Describe the supplied file's purpose rather than promising invisible compression:

“This AVIF is a smaller viewing copy. I have kept the original and can provide the agreed JPEG, PNG or print export if your software needs it.”

Include the intended use and available fallback in the delivery note. If the recipient requests a lab-specific format or an editing source, provide that export rather than expecting them to convert the viewing copy themselves.

Frequently Asked Questions About PNG to AVIF

These answers distinguish the original file, the converted image and the destination's requirements.

Can an AVIF file be converted back to PNG

Yes, with a decoder that supports the file. A PNG made from a lossy AVIF contains the decoded result; it cannot recover discarded source information. An exact lossless round trip requires compatible precision and settings plus a sample comparison.

Will clients be able to open AVIF files

Current major browsers support AVIF according to the dated MDN check above. Older browsers, native apps, editors and print services may have different support. Keep a JPEG or PNG fallback for the recipient's actual use.

Does converting PNG to AVIF affect the original file

The avifenc commands here write separate output files and leave the input PNG unchanged. Other workflows may overwrite, move or delete inputs, so retain masters separately and use an explicit output destination.

Is AVIF better than PNG for every image

No. Our lossless logo grew by 13.5%. Compare actual size and sample preservation; PNG remains useful for exact-pixel graphics and broadly supported editing assets. A smaller lossy result may still be unsuitable for fine text or color-critical edges.

Should AVIF replace print files

Follow the print provider's accepted formats, profile, dimensions and precision requirements. Do not replace an agreed JPEG, TIFF or PNG with AVIF simply because it is smaller. Retain the source for future exports.

What's the safest way to start

Convert a few copies covering a photograph, transparency and fine text. Record the encoder/version/settings, compare the decoded samples when exact preservation matters, check required metadata and keep the originals and a compatible delivery export.

SendPhoto helps photographers organize galleries and share finished work with access and download controls. Choose exports that fit the recipient and the platform's processing; this conversion example is not a promise that a gallery serves AVIF originals unchanged.

A better way to deliver client photos.

SendPhoto helps photographers turn finished work into private, branded galleries with passwords, watermarks, and download controls.

No credit card. Clients open the gallery without an account.