Image Optimization
Choosing formats and sizes to keep images light.
See it on the 3D treeGoing deeper
It combines picking a suitable format, compressing, resizing to the displayed dimensions and offering several sizes so browsers can choose. Photographs often suit AVIF, WebP or JPEG; simple graphics suit SVG or sometimes PNG. Delaying off-screen images and declaring dimensions helps loading and reduces layout shifts.
Why it matters
Smaller files load faster and cost users less data, while informed choices keep images looking as intended.
In practice
A huge camera photograph shown as a small thumbnail is replaced with correctly sized versions for standard and dense screens.
Common mistake
Uploading original full-size images and relying on CSS to shrink them.
Connected terms
- Performance BudgetOptimised images help a page stay within its weight and timing limits.
- CompressionLossy or lossless compression is the main way to cut file size.
- Mesh GradientExported mesh backgrounds need compressing without introducing artefacts.
- SVGVector files scale cleanly and are often small for icons and logos.
- WebPA web format that is often smaller than comparable JPEG or PNG files.