Image formats explained: JPEG, PNG, WebP, AVIF and HEIC
The same photo can be a 4 MB file or a 400 KB one, and look almost identical. The difference is the format and how it compresses: what it throws away, what it keeps, and what it can store besides the picture. This guide covers the five formats you are most likely to meet, which one to use for what, and why an iPhone photo sometimes will not open on another device.
Lossy and lossless
Every format compresses the picture; the question is whether it discards anything.
Lossy formats — JPEG, lossy WebP, AVIF and HEIC — throw away detail the eye is unlikely to miss, which is how a photo gets ten times smaller. Each time a lossy file is edited and saved again, a little more is lost.
Lossless formats — PNG, and lossless WebP — keep every pixel exactly. They are the right choice for screenshots, logos, diagrams and anything with sharp edges or text, where lossy compression leaves visible smudges. For photographs they produce files many times larger for no visible gain.
The five formats at a glance
| Format | Compression | Transparency | Best for | Where it opens |
|---|---|---|---|---|
JPEG | Lossy | No | Photos that must open everywhere | Everywhere |
PNG | Lossless | Yes | Screenshots, logos, graphics with text | Everywhere |
WebP | Lossy or lossless | Yes | Photos and graphics on websites | All current browsers; most editors |
AVIF | Lossy or lossless | Yes | The smallest web images | All current browsers; fewer editors |
HEIC | Lossy | Yes | Photos taken on iPhone and iPad | Apple devices, Windows with an extension; only Safari among browsers |
Why your iPhone saves photos as HEIC
Since iOS 11 in 2017, iPhones save photos as HEIC by default — the setting is called High Efficiency. HEIC stores the image with the same compression used for HEVC video, which typically makes a photo around half the size of a JPEG of similar quality. On a phone that takes thousands of pictures, that is a lot of storage.
The cost is compatibility. HEVC is covered by patent licences, so support outside Apple is patchy: Windows needs an extension, many web forms and older programs reject the file, and among browsers only Safari 17 and later can display it. That is why a HEIC photo can open fine on the phone and fail as soon as it leaves it.
There are three ways round it:
- Change the camera format to Most Compatible in Settings → Camera → Formats. New photos are then saved as JPEG.
- Leave Automatic selected in Settings → Photos → Transfer to Mac or PC, so the phone converts to JPEG when copying to a computer over a cable.
- Convert the files you need to share. The nTools converter does it in your browser, without uploading the photo.
Which format to use
- Sharing a photo with anyone, anywhere: JPEG. It is the one format every device, app and form accepts.
- Screenshot, logo, diagram, anything with text: PNG. Sharp edges stay sharp, and transparency is kept.
- Images on your own website: WebP or AVIF. Both are supported by every current browser and are usually much smaller than JPEG. AVIF is often smaller again, but slower to encode and supported by fewer editing programs.
- Keeping the originals from an iPhone: HEIC is fine for storage; convert copies when you need to send them somewhere else.
Making an image smaller
Two settings do most of the work, and the first matters more.
Resolution. A phone photo is often 4,000 pixels wide, while a web page or email shows it at perhaps 1,200. Halving the width and height removes three quarters of the pixels, and usually shrinks the file by about the same proportion before quality is touched at all.
Quality. For JPEG and WebP, a quality setting around 75–85 is usually indistinguishable from the original at normal viewing size, and much smaller than 100. Below about 60, blocky patches and smeared edges start to show.
Converting a JPEG to PNG never makes it smaller or better: PNG faithfully preserves a picture that has already lost its detail, in a much larger file.
What a photo carries besides the picture
Photos from phones and cameras include metadata, known as EXIF: the date and time, the camera model, the exposure settings — and often the GPS position where the photo was taken. Posting the original file can reveal where you live.
Many social networks remove this data when you upload. Email, messaging apps that send the original file, and file-sharing links usually do not. When the location matters, check the photo's details before sending it, or send a converted copy: the nTools HEIC converter, for example, does not copy the metadata into the JPEG it produces.
Frequently asked questions
Is HEIC better quality than JPEG?
At the same file size, yes, usually noticeably. At the same quality, HEIC files are smaller. Converting a HEIC to JPEG at high quality keeps the photo looking the same, at a larger size.
Why does converting a JPEG to PNG make the file bigger?
PNG is lossless, so it stores every pixel of the already-compressed JPEG exactly, including its artefacts. It cannot bring back what JPEG discarded.
Can I use WebP everywhere now?
On websites, yes: every current browser supports it. As a file to send to people, JPEG is still safer, because some older programs and online forms reject WebP.
Does taking a screenshot of a photo remove its location?
Yes, a screenshot is a new image without the original's EXIF data — but it also loses resolution and quality. Converting or exporting without metadata is the better way.