Image formats
JPG, PNG, WebP, AVIF or HEIC: which image format to use, and when
Learn why a file came out huge, blurry or unopenable, and pick the format that fits where it is going, with versions and figures checked against official sources.
Photo, screenshot or logo? The content picks the format
The job portal rejects your iPhone photo because it ends in .heic. The spreadsheet screenshot you dropped into a team chat arrives with fuzzy digits. The logo you placed on a dark slide shows up inside a white box. Three complaints, one cause: the format did not match the content, or the destination.
Start with how the file is compressed. Lossy compression throws data away to shrink the file, and MDN, Mozilla's developer documentation, is blunt about it: the process is irreversible. Lossless compression lets the original be rebuilt exactly. JPG is always lossy. PNG and GIF are lossless. WebP and AVIF can do either, depending on the setting chosen when the file is written.
Then look at the content. Photographs are made of smooth transitions and tolerate losses the eye never registers. Screenshots, diagrams, logos and text are made of hard edges, and for those MDN recommends lossless encoding, because smeared edges and color halos around letters stand out at once. Artwork built from shapes is a separate case: SVG stores drawing instructions rather than pixels, so it stays sharp at any size.
I have X and need Y: which format to use
| You have | You need | Use |
|---|---|---|
An iPhone .heic photo | To upload to a form or open on Windows | JPG — HEIC to JPG |
| A PNG photo too big to email | To attach or publish it | JPG — PNG to JPG |
| A screenshot full of text | To send it still readable | PNG; if too heavy, cut the width in resize image |
| Product photos in JPG | A lighter site or store | WebP, keeping the JPG as a fallback — JPG to WebP |
| A logo with a transparent background | To place it over any color | SVG if you have the vector; otherwise PNG or WebP |
A .webp or .avif saved from a website | To open it in an older editor | JPG for a photo, PNG if it has transparency — WebP to PNG |
| A heavy animated GIF | A smaller animation | Animated WebP or AVIF, made in other software; LivreImage keeps only the first frame |
| A square version of your logo | A favicon | ICO up to 256 px, or PNG — favicon generator |
JPG has no alpha channel: when a transparent PNG becomes a JPG, the empty area is filled with a solid color (white in LivreImage) and there is no undo. Keep the original PNG.
What each format can store
Color depth is the number of bits per channel: more bits give more in-between tones and less banding in gradients. Partial transparency needs an alpha channel, which JPG lacks.
| Format | Compression | Transparency | Animation | Color | Typical use |
|---|---|---|---|---|---|
| JPG / JPEG | Lossy | No | No | 8 bits per channel | Photos |
| PNG | Lossless | Yes (alpha) | Yes, as APNG | 1 to 16 bits per sample | Screenshots, logos, text |
| WebP | Lossy or lossless | Yes | Yes | 8 bits per channel | Website images |
| AVIF | Lossy or lossless | Yes | Yes | 8, 10 or 12 bits; HDR | Websites, minimum weight |
| HEIC / HEIF | Lossy or lossless | Yes | Yes (sequences) | High bit depth, wide gamut | iPhone photos |
| GIF | Lossless | On or off, never partial | Yes | 256 colors per palette | Simple animations |
| SVG | Vector (XML text) | Yes | Yes | CSS colors | Logos, icons, diagrams |
| BMP | Usually none | Not in the common type | No | 24 bits (common type) | Legacy software |
| ICO | Same as the PNG or BMP inside | Yes | No | Same | Icons and favicons |
Do WebP, AVIF and HEIC open in every browser?
According to MDN, JPG, PNG, GIF, SVG, BMP and ICO open in every version of Chrome, Edge, Firefox, Opera and Safari. The three newer formats depend on the version:
| Format | Chrome | Edge | Firefox | Safari on Mac | Safari on iPhone |
|---|---|---|---|---|---|
| WebP | 32 | 18 | 65 | 14 (on macOS 11 or later) | 14 |
| AVIF | 85 | 121 | 93 (animation in 113) | 16.1 partial; full in 16.4 | 16.0 (animation in 16.4) |
| HEIC | No | No | No | 17.0 | 17.0 |
How many people can open it
Add up the browsers that qualify and Can I use arrives at about 97% of global usage for WebP and 95% for AVIF. HEIC sits below 15%: only Safari displays it. Internet Explorer opens none of the three.
Outside the browser
Apple devices read HEIC from iOS 11 and macOS High Sierra on. Android decodes HEIF from version 8.0. On Windows 10, Microsoft asks for two Microsoft Store extensions, HEIF Image Extensions (free) and HEVC Video Extensions (listed at $0.99), even when photos are all you want to open. For an upload form or an unfamiliar computer, converting HEIC to JPG removes the question.
Why are WebP and AVIF smaller than JPEG?
The JPEG standard dates from 1992. It cuts the picture into blocks of 8 by 8 pixels, turns each block into frequencies (the discrete cosine transform) and drops fine detail. Because it works in blocks, the seams between them start to show when compression is pushed too far.
Lossy WebP adds a step before that: prediction. The encoder guesses each block from neighboring blocks it has already processed and stores only the difference between the guess and the real thing, which typically holds many zeros and compresses better. It also swaps JPEG's Huffman coding for arithmetic coding, which is more efficient. AVIF applies the same idea with the tools of AV1, a newer video codec, and inherits the recent advances in video compression.
How much does that buy? In Google's study, WebP files came out 25% to 34% smaller than JPEGs with the same SSIM score, a measure of similarity to the original; for lossless mode the company reports files 26% smaller than PNG. For AVIF, the authors of the guide on web.dev, a Google site, report files more than 50% smaller than JPEG, cautioning that the gain varies with the content, the encoder settings and the quality you aim for.
These are figures from the people who build the formats. The comparison slider in JPG to WebP shows the real gain on your own image.
Four mistakes that cost quality or megabytes
Saving a photo as PNG
PNG stores every pixel exactly, and a photograph offers almost no repetition for it to exploit. The Library of Congress puts typical JPEG settings at a 10:1 to 20:1 reduction. A 12-megapixel photo takes 36 MB uncompressed (3 bytes per pixel); at those ratios a JPEG lands between 1.8 and 3.6 MB.
Saving a screenshot or text as JPG
The documentation of libjpeg-turbo, inherited from the Independent JPEG Group, advises against feeding it line art or pictures with only a handful of colors, and MDN describes the result: smeared edges and color halos around the text. It may not even save space: according to Google, a PNG with few colors converted to a lossy format can come out larger.
Re-saving the same JPG over and over
Every edit saved as JPG is another lossy pass. The libjpeg-turbo documentation says the damage adds up, and that after about ten rounds a picture can look visibly worse than after the first. Edit a lossless file and produce the JPG once, at the end.
Converting JPG to PNG to get quality back
The PNG preserves, perfectly, the artifacts the JPG already had. What lossy compression discarded does not come back, and Google's WebP documentation adds that turning a lossy original such as a JPEG into lossless WebP or PNG usually produces a bigger file. JPG to PNG makes sense only when the destination demands PNG.
GIF, BMP and ICO: when the old formats still make sense
GIF dates from 1987 and holds at most 256 colors per palette; each pixel is either fully opaque or fully transparent, so soft edges are out. The GIF89a specification itself cautions that GIF was never meant as an animation platform, merely capable of it within limits. For still images MDN points to PNG; for animation, to WebP, AVIF or APNG.
The common BMP compresses nothing: 3 bytes per pixel, which is why MDN tells web authors to steer clear of it. It survives to feed older software that accepts only .bmp.
ICO is a Windows container that can hold several icons, each one a BMP or a PNG, at no more than 256 × 256 pixels. On websites, MDN notes, ICO favicons are giving way to PNG.
Tools to put it into practice
Frequently asked questions
Is JPG different from JPEG?
No. They are two extensions for the same format. MDN lists .jpg, .jpeg, .jpe, .jif and .jfif for the same image/jpeg type.
Is there a maximum size for a WebP image?
Yes: 16,383 × 16,383 pixels, according to Google. A very long full-page capture can exceed that; PNG's ceiling is far higher. In LivreImage, images whose longer side exceeds 10,000 px are scaled down.
How do I make an iPhone shoot JPEG instead of HEIC?
Open Settings, tap Camera, tap Formats and choose Most Compatible. According to Apple, all new photos will then use JPEG.
Can a PNG be animated?
Yes. The current PNG specification (Third Edition, a W3C Recommendation dated June 24, 2025) covers both static and animated images, and MDN lists animated PNG support from Chrome 59, Edge 12, Firefox 3, Opera 46 and Safari 8.
Can LivreImage save AVIF?
No: LivreImage does not produce AVIF today. The output button only appears when the browser reports that it can encode the format, and in our tests of September 2026 Chrome could not. Reading AVIF is a different matter: it works wherever the browser can decode it, in AVIF to JPG.
Sources
Official documents and technical references consulted for this guide.
- Image file type and format guide — MDN Web Docs (Mozilla) (accessed September 28, 2026)
- Lossy compression (glossary) — MDN Web Docs (Mozilla) (accessed September 28, 2026)
- The animate element — SVG reference — MDN Web Docs (Mozilla) (accessed September 28, 2026)
- WebP image format — Can I use (accessed September 28, 2026)
- AVIF image format — Can I use (accessed September 28, 2026)
- HEIF/HEIC image format — Can I use (accessed September 28, 2026)
- An image format for the Web (WebP) — Google for Developers (accessed September 28, 2026)
- WebP Compression Study — Google for Developers (accessed September 28, 2026)
- Compression Techniques (WebP) — Google for Developers (accessed September 28, 2026)
- Frequently Asked Questions (WebP) — Google for Developers (accessed September 28, 2026)
- Using AVIF to compress images on your site — web.dev (Google) (accessed September 28, 2026)
- Image formats: JPEG — web.dev (Google) (accessed September 28, 2026)
- AV1 Image File Format (AVIF) v1.2.0 — Alliance for Open Media (accessed September 28, 2026)
- A Technical Overview of AV1 (Han et al., arXiv:2008.06091) — arXiv — authors from Google / Alliance for Open Media (accessed September 28, 2026)
- Overview of JPEG 1 — Joint Photographic Experts Group (jpeg.org) (accessed September 28, 2026)
- JPEG Image Encoding Family — Library of Congress (accessed September 28, 2026)
- High Efficiency Image File Format (HEIF) — Library of Congress (accessed September 28, 2026)
- libjpeg-turbo: usage.txt (cjpeg, djpeg and jpegtran documentation) — libjpeg-turbo / Independent JPEG Group (accessed September 28, 2026)
- Portable Network Graphics (PNG) Specification (Third Edition) — W3C (accessed September 28, 2026)
- Graphics Interchange Format, Version 89a — CompuServe (copy hosted by W3C) (accessed September 28, 2026)
- Using HEIF or HEVC media on Apple devices — Apple Support (accessed September 28, 2026)
- Photos app Video Editor error: Can't view this file type — Microsoft Support (accessed September 28, 2026)
- Supported media formats — Android Developers (accessed September 28, 2026)
Found a mistake or something out of date? Tell us through the contact form