# Image File Formats

> JPEG, PNG, GIF, WebP and AVIF, and what each one is good at. How to pick the file type that keeps a picture sharp and the file small.

**Course:** [Color Theory and Images](https://learn.benibix.com/learn/design-visual-communication)  
**Time:** 12 min

**After this lesson you can:**

- Pick a format for a photo or a logo
- Say what GIF can and cannot do
- Explain why WebP and AVIF exist

## Which image file format to use

An image file format is the kind of file a picture is saved as. Five cover nearly everything on the web: JPEG, PNG, GIF, WebP and AVIF. They differ in three ways. Does it lose detail? Can parts be see-through? Can it move? Pick by the picture, not by habit.

JPEG is the usual file for photos, and it dates from 1992. It uses lossy compression, so files are small but some detail is lost. It cannot have see-through parts. Each time a JPEG is edited and saved again, it loses a little more, so keep the original.

PNG keeps every pixel exactly as it was, and it can have see-through parts. That makes it the right choice for logos, screenshots and anything with sharp edges or text. For a photo, a PNG can be several times bigger than a JPEG that looks the same.

GIF is the oldest, from 1987. It can hold at most 256 colors, which is why photos saved as GIF look rough. It is known for short, looping animations. For moving pictures today, a short video file is usually far smaller and smoother.

WebP was made for the web in 2010. It can do the jobs of both JPEG and PNG: lossy or lossless, with see-through parts and even animation. Its photos are often a quarter to a third smaller than a JPEG of the same quality.

AVIF is newer, from 2019, and built on a video format. It can make photos smaller again than WebP while keeping them sharp. All the main browsers now show it. Saving takes longer, so it suits pictures that are made once and seen many times.

A common mistake is to upload a 5 megabyte photo straight from a camera to a website. It looks the same as a 300 kilobyte WebP and loads far slower. Shrink the pixels to the size it is shown at, then save it in a modern format.

![A table with three columns, JPEG, PNG and WebP, and four rows: best for, see-through parts, how it shrinks, and file size. JPEG is for photos, has no see-through parts and loses some detail. PNG is for logos and screenshots, has see-through parts and keeps every pixel. WebP does both kinds and makes the smallest files.](https://learn.benibix.com/diagrams/des3-image-formats.svg)

## Five image formats at a glance

| Format | Loses detail | See-through | Best for |
| --- | --- | --- | --- |
| JPEG | Yes | No | Photos |
| PNG | No | Yes | Logos, screenshots |
| GIF | Colors cut to 256 | On or off only | Tiny loops |
| WebP | Either | Yes | Photos and graphics on the web |
| AVIF | Either | Yes | The smallest web photos |

### Example: A shop page that loaded slowly

An online shop had 40 product photos saved as PNG, about 2 megabytes each. The page took 8 seconds to load on a phone.

The owner saved them as WebP at the size they are shown. Each dropped to about 150 kilobytes, and the page loaded in under 2 seconds.

**Words in this lesson:** [Image File Format](https://learn.benibix.com/term/design/image-file-format), [Joint Photographic Experts Group (JPEG)](https://learn.benibix.com/term/design/jpeg), [Portable Network Graphics (PNG)](https://learn.benibix.com/term/design/png), [Graphics Interchange Format (GIF)](https://learn.benibix.com/term/design/gif), [WebP](https://learn.benibix.com/term/design/webp), [AV1 Image File Format (AVIF)](https://learn.benibix.com/term/design/avif)

**Question:** Which format suits a logo with see-through parts and sharp edges?

**Answer:** PNG. PNG keeps every pixel and supports see-through parts. JPEG cannot be see-through and blurs sharp edges. GIF cuts the colors to 256.

---

Source: https://learn.benibix.com/learn/design-visual-communication/image-file-formats
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
