JPG and AVIF explained
JPEG is a lossy image format designed for photographs. It works by discarding detail the human eye is least likely to notice, particularly in colour and in smooth gradients, which is why it compresses photos far better than it compresses text or line art.
AVIF stores still images using the AV1 video codec's intra-frame compression. It generally achieves the smallest files of any widely supported format, and it handles wide colour gamut and HDR, which JPEG cannot.
- Where JPG files come from
- Digital cameras, phone screenshots on Android, and essentially every photo on the pre-2015 web.
- Where AVIF is used
- Performance-focused websites and modern image pipelines.