← Back to journal
FORMATS · 7 MIN READ

JPEG, PNG, WebP, and AVIF without the guesswork

Choose the right kind of file for archives, websites, and sharing.

JPEG, PNG, WebP, and AVIF without the guesswork

An image format is a tradeoff among compatibility, file size, editing needs, and visual quality. Rather than searching for a universal winner, decide what the file is supposed to do. A photo stored as a camera original, a diagram embedded in a guide, and a thumbnail on a website have different priorities.

JPEG: the familiar sharing format

JPEG remains a practical choice for ordinary photographs. It is widely readable, and its lossy compression can make continuous-tone images compact. Each time an image is recompressed at a lower quality, however, some information is discarded. That is one reason to keep your source separately instead of repeatedly opening and exporting the same JPEG.

Use JPEG for copies meant to travel easily between devices and people. Choose dimensions and quality by looking at the output, not by aiming at a magical percentage. Very small type, sharp graphics, and high-contrast edges can show artifacts more readily than a soft landscape.

PNG: precision and transparency

PNG uses lossless compression and supports transparency. It is especially useful for screenshots, interface captures, simple diagrams, and artwork with hard edges. A detailed photographic PNG may be much larger than a visually similar JPEG; that does not make PNG “bad”, only different. If you need to edit a graphic repeatedly without introducing JPEG compression artifacts, a lossless source can be valuable.

A caveat: converting an already-compressed JPEG to PNG does not restore discarded information. It merely prevents additional loss during that particular encoding step.

WebP and AVIF: strong web delivery options

WebP supports both lossy and lossless encoding, as well as transparency. AVIF also supports efficient photo compression, transparency, and higher color depths. These formats can be excellent for web images where bandwidth matters. But the best compression setting varies by image, and compatibility across image editors and older devices may differ from current browsers.

For a website, a modern format can be paired with a fallback through the HTML picture element. For an archive handed to family members with unknown software, a JPEG export is often a less surprising delivery choice. Do not confuse a web-friendly derivative with the master copy you want to preserve.

A simple decision table in words

For a photographic original, keep the camera's native file or earliest highest-quality copy. For a photograph shared broadly, consider JPEG. For screenshots or illustrations requiring exact hard edges, use PNG. For responsive website thumbnails, test WebP or AVIF and keep a compatible fallback when necessary. For a complex editable project, retain the working source in addition to any final image export.

The MDN image format guide explains current browser support, lossless versus lossy compression, and fallback strategies. Formats will change over time; your strongest protection is keeping a good source and recording how derivatives were produced.

— END OF NOTE —More from the journal ↗