What is GIF (Graphics Interchange Format)?
GIF is a raster format limited to a 256-colour palette per frame, with support for simple animation and 1-bit (on/off) transparency. It uses lossless LZW compression.
Best for: Short looping animations and simple graphics with few colours. Trade-offs: Only 256 colours (poor for photos), 1-bit transparency with hard edges, and large file sizes compared with video or WebP.
What is JPG / JPEG (Joint Photographic Experts Group)?
JPG is a lossy raster format that compresses photographic images by discarding detail the human eye is unlikely to notice. Quality is set on a 0–100 scale; most web images use 60–85.
Best for: Photographs and complex images with smooth colour gradients, where small file size matters more than pixel-perfect accuracy. Trade-offs: No transparency, visible artefacts at low quality, and every re-save loses a little more detail (generation loss).
| Property | GIF | JPG |
|---|
| Compression | Lossless | Lossy |
| Transparency | Yes | No |
| Typical use | Short looping animations and simple graphics with few colours. | Photographs and complex images with smooth colour gradients |