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.
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.
| Format | Best for | Transparency | Compression | Watch out for |
|---|---|---|---|---|
| JPG / JPEG | Photographs, email, print | No | Lossy | Text and sharp edges get fuzzy |
| PNG | Screenshots, logos, graphics | Yes | Lossless | Large files for photos |
| WebP | Photos and graphics on the web | Yes | Lossy or lossless | Older software may not open it |
| AVIF | Modern web photos | Yes | Lossy or lossless | Slower to encode, newer support |
| HEIC / HEIF | iPhone photo storage | Yes | Lossy | Limited support outside Apple devices |
| GIF | Simple animations | Binary | Lossless palette | Only 256 colours, large files |
| SVG | Logos, icons, diagrams | Yes | Vector | Not suitable for photographs |
| TIFF | Print, scanning, archiving | Yes | Lossless | Very large files |
| RAW | Camera editing | No | Unprocessed sensor data | Requires conversion before sharing |
| JPEG XL | Archival and efficient storage | Yes | Lossy or lossless | Browser support varies |
| BMP | Legacy Windows images | Yes | Usually uncompressed | Huge files |
| ICO | Favicons | Yes | Multiple sizes | Not 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.
- Photo for a website: AVIF or WebP, with a JPEG fallback if you need older-browser support.
- Photo for email or print: JPEG at a sensible quality and resolution.
- Screenshot, chart or logo with text: PNG, or SVG when the source is vector.
- Simple animation: GIF for compatibility, short video when quality and size matter.
- iPhone photo going to a Windows user or an upload form: convert HEIC to JPG first.
- Image that will be edited many times: keep a lossless original and export a copy.
Related:Convert to JPG, Convert from JPG, PNG to AVIF, HEIC to JPG
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
- PNG vs JPG: when to use eachPNG or JPG? Compare transparency, quality, file size and browser support, and learn which format fits photos, screenshots, logos and the web.
- HEIC vs JPG: which should you use?HEIC saves space on iPhone, JPG opens everywhere. Compare quality, size, compatibility and privacy, and learn when to convert HEIC to JPG.
- Image optimization checklist for faster websitesA practical image optimization and image SEO checklist: formats, compression, responsive sizes, lazy loading, alt text and Core Web Vitals.