Guide

Image file formats explained

Every image format is a trade-off between quality, file size, transparency and compatibility. This guide helps you pick the right one without memorising codecs.

8 min read

A file extension is not just a label. It tells you how the pixels were stored, how much detail was discarded and which programs will open the result. Choosing well can shrink a web page, speed up an email or prevent a client from seeing a broken image.

You do not need to understand the internals of every codec. You only need three questions: is this a photo or a graphic, does it need transparency, and where will it be used?

The two compression families

Lossy formats discard detail that the eye is unlikely to notice, especially in photographs. JPG, WebP, AVIF and HEIC are normally used this way. Lossless formats preserve every pixel. PNG and TIFF are the common examples. SVG is different again: it stores shapes and text as instructions rather than pixels.

Lossy does not mean bad. A high-quality JPG or AVIF can look identical to a PNG at normal viewing size while being many times smaller. It does mean that repeated editing and re-saving slowly accumulates damage.

Format-by-format comparison

The table below covers the formats most people meet in browsers, phones and design tools.

Common image formats and their best use
FormatBest forTransparencyCompressionWatch out for
JPG / JPEGPhotographs, email, printNoLossyText and sharp edges get fuzzy
PNGScreenshots, logos, graphicsYesLosslessLarge files for photos
WebPPhotos and graphics on the webYesLossy or losslessOlder software may not open it
AVIFModern web photosYesLossy or losslessSlower to encode, newer support
HEIC / HEIFiPhone photo storageYesLossyLimited support outside Apple devices
GIFSimple animationsBinaryLossless paletteOnly 256 colours, large files
SVGLogos, icons, diagramsYesVectorNot suitable for photographs
TIFFPrint, scanning, archivingYesLosslessVery large files
RAWCamera editingNoUnprocessed sensor dataRequires conversion before sharing
JPEG XLArchival and efficient storageYesLossy or losslessBrowser support varies
BMPLegacy Windows imagesYesUsually uncompressedHuge files
ICOFaviconsYesMultiple sizesNot a general-purpose image

What browsers and platforms accept

Current versions of Chrome, Firefox, Safari and Edge handle JPG, PNG, GIF, SVG and WebP. AVIF is supported in current major browsers but may fail in older ones. HEIC is usually only decoded natively by Apple software, which is why it causes so much friction when shared with Windows users.

If you need one format that works almost everywhere, JPEG for photographs and PNG for graphics remain the safest defaults. Modern formats are best served with a fallback.

A simple decision path

Start with the destination, not the format. The place where the image will be used usually narrows the choice to one or two options.

  1. Photo for a website: AVIF or WebP, with a JPEG fallback if you need older-browser support.
  2. Photo for email or print: JPEG at a sensible quality and resolution.
  3. Screenshot, chart or logo with text: PNG, or SVG when the source is vector.
  4. Simple animation: GIF for compatibility, short video when quality and size matter.
  5. iPhone photo going to a Windows user or an upload form: convert HEIC to JPG first.
  6. Image that will be edited many times: keep a lossless original and export a copy.

Transparency, briefly

JPEG cannot store transparent pixels. If you save a logo with a transparent background as JPG, the empty area becomes a solid colour, usually white or black. PNG, WebP, AVIF, GIF and SVG can all preserve transparency in different ways.

When a tool offers a background colour for JPG output, that colour fills the transparent areas. Choose it deliberately rather than accepting the default.

When to keep the original

Convert a copy, not the only version you have. RAW, TIFF and high-resolution PNG files contain information that a compressed JPG has already thrown away. Keep the original if there is any chance you will edit, print or enlarge the image later.

Frequently asked questions

Which image format has the best quality?

Lossless formats such as PNG and TIFF preserve every pixel, but quality also depends on the source. For photographs, a high-quality JPEG or AVIF is visually excellent at normal viewing size.

Is WebP supported everywhere?

All current major browsers support WebP. Very old software, some desktop publishing tools and a few upload forms may not.

Should I use PNG or JPG for screenshots?

Use PNG. Screenshots contain text and sharp edges, which JPEG compression makes fuzzy. PNG keeps them crisp.

What is AVIF?

AVIF is a modern image format based on the AV1 video codec. It usually produces smaller files than JPEG or WebP, but encoding takes longer and very old browsers cannot display it.

Can Windows open HEIC files?

Windows 10 and 11 can open HEIC with the HEIF and HEVC extensions installed. Without them, convert the photo to JPG first.

Is GIF still worth using?

GIF remains useful for short, simple animations that must work everywhere. For longer or higher-quality animation, a video file is usually smaller and smoother.

Continue reading