Image compression reduces file size by removing or simplifying data. There are two main approaches: lossy and lossless, each with distinct advantages and trade-offs.
Lossless compression reduces file size without any quality loss. The original image can be perfectly reconstructed from the compressed data. PNG uses lossless compression. Typical savings: 20-50% depending on image content.
Lossy compression achieves much greater size reduction by discarding data that is less noticeable to human vision. JPG and WebP use lossy compression. At moderate quality settings, the visual difference is often imperceptible while file sizes are 70-90% smaller.
Use lossless when pixel-perfect accuracy matters (medical imaging, screenshots, graphics). Use lossy when visual quality is good enough and smaller file size is the priority (web photos, social media, email).