Reduce image file size without losing quality
“Without losing quality” usually means without any visible difference, and that is very achievable. Here is how to get big savings you cannot see.
Lossless vs visually lossless
- Lossless compression, like OxiPNG for PNG, keeps pixels identical byte for byte. The savings are modest, usually 5 to 30 percent.
- Visually lossless compression, like high-quality JPEG, WebP, or AVIF, drops data your eyes cannot detect. The savings are huge, often 70 to 90 percent, with no change you can spot.
For photos, visually lossless is the goal. For logos and screenshots, lossless PNG or lossless WebP is often the better pick.
The settings that actually matter
- Dimensions. Resizing an oversized image is free quality. You are only removing pixels that were never shown.
- Format. Switching a JPEG to AVIF can halve the size at the same quality.
- Quality around 80. The very top of the quality range costs a lot of bytes for changes nobody notices.
Myths worth ignoring
- “Higher quality is always better.” Past about 85 you pay a large size penalty for no visible gain.
- “Compressing again keeps shrinking it.” Re-compressing a lossy image just piles on artifacts. Always start from the original.
- “You need a powerful server.” Modern browsers run the same WebAssembly codecs locally, so there is no upload required.
A workflow that holds up
- Resize to the largest size you will actually display, around twice that for retina screens.
- Convert to AVIF or WebP.
- Set quality to about 80, or use a target file size.
- Compare before and after to confirm it looks right.
Every step here is one control in the compressor. Try dropping a photo in and converting it to AVIF. Most people are surprised how small it gets.