Quick answer
Image compression reduces the number of bytes needed to store or transfer an image. Lossless compression preserves the represented image data, while lossy compression discards some information to achieve smaller files.
Original example
One picture, different file sizes
A prepared 1200 by 800 photograph might be exported at two JPEG quality settings. Both files keep the same pixel dimensions, but the smaller file may show softer detail or block-like artifacts when inspected closely.
Lossy and lossless compression
Lossless formats reconstruct their encoded image data without compression loss. Lossy formats trade some fidelity for smaller files, often effectively for photographs.
File size also depends on dimensions, color complexity, metadata, format, and encoder settings. Compression percentage is not a universal quality measurement across tools.
Common misunderstandings
- Compression and resizing are separate operations, although export tools may perform both.
- Lossless does not mean a file is uncompressed.
Related answers
Sources
- Image file type and format guide - MDN Web Docs, accessed 2026-10-30
This is an unreviewed preview draft. Corrections can be sent after the owner configures a verified contact address.