Key Takeaways
Learn the secrets of optimal image compression to keep your site fast and your socials sharp.
The Need for Speed and Quality
Large image files create two distinct problems. On websites, they slow down page load times — every additional second of load time reduces conversion rates by roughly 7%. On social media, oversized uploads force the platform's compression algorithms to work harder, often with worse results than if you had pre-compressed the image yourself at higher quality settings. The goal of image compression is to find the threshold where file size is as small as possible without introducing visible quality degradation. Get it right, and you win on both performance and quality.
Understanding Lossy vs. Lossless Compression
Lossless compression reorganizes and encodes image data more efficiently without removing any pixels. The result is a smaller file that decodes to the identical pixel array as the original. PNG and WebP lossless use this approach. The downside is that the compression ratio is limited — you typically achieve 20–30% file size reduction.
Lossy compression permanently removes some image data, exploiting the fact that human vision cannot detect certain types of information loss. JPEG and WebP lossy use this approach. The upside is dramatic file size reduction — 60–85% compared to raw or lossless — with minimal perceived quality loss when done correctly. The key phrase is "perceived quality loss." The art of image compression is calibrating exactly how much data you can remove before the human eye notices.
The Sweet Spot: Quality Settings Explained
Most image export tools present quality as a percentage (0–100%) or a slider. Here's what the numbers mean in practice:
- 90–100%: Near-lossless JPEG. Ideal for printing and source files. File size is large with minimal benefit over 85%.
- 80–85%: The recommended range for social media and web. Produces files 40–60% smaller than 100% quality with virtually no visible difference on typical screens.
- 70–75%: Acceptable for background images and thumbnails viewed at small sizes. Some artifacts visible at 1:1 zoom.
- Below 60%: Visible degradation in most images. Avoid unless file size constraints are extreme (mobile app thumbnails, etc.).
The Correct Workflow
Resize first, then compress. This order matters. If you compress first and then resize, the resampling algorithm may amplify the compression artifacts. Always:
- Start with your full-resolution source file
- Resize to the exact pixel dimensions required by the destination platform
- Apply compression / quality settings during export
- Run through a secondary optimizer if needed (TinyPNG, Squoosh)
Working from the exact required dimensions means the compression algorithm is working on the final number of pixels, not on a larger image that will be scaled down later. This gives you the most accurate preview of quality vs. file size.
Tools and Settings
For social media creators: Photoshop's "Export As" dialog, Affinity Photo's export, Canva's download settings, and GIMP all provide JPEG quality sliders. Set to 80% for general use.
For web developers: Use Squoosh (browser-based, free, excellent for comparison), ImageOptim (Mac), or the npm package sharp for automated pipelines. Squoosh lets you compare before/after at the pixel level before committing to compression settings.
For bulk processing: TinyPNG and TinyJPG (web), ImageOptim (Mac), and RIOT (Windows) support batch processing. These tools often achieve additional 10–20% savings on top of what your export tool does by using more advanced entropy encoding.
Banding in Gradients
One visible side effect of aggressive JPEG compression is banding — visible stepped transitions in smooth gradients like blue skies or soft shadows. If your images regularly include gradients, export at no lower than 80% quality and use the sRGB color profile. Adding a small amount of dithering noise during export can also help smooth banding artifacts in gradients.
Metadata and File Size
EXIF metadata (camera make, GPS coordinates, exposure settings) is stored inside image files and can add 20–100 KB to each file. This metadata has no impact on the displayed image. Most optimization tools offer a "strip metadata" option — enable it for web and social exports. Note that some platforms (Instagram, etc.) strip metadata automatically, but stripping it yourself ensures the smallest possible upload size.
Summary Checklist
- Resize to exact dimensions first, then compress
- JPEG quality 80–85% for social media and web
- Use TinyPNG or Squoosh for secondary optimization
- Watch for gradient banding — increase quality or use dithering
- Strip EXIF metadata for smaller file sizes
- Target under 500 KB for social media posts, under 200 KB for thumbnails
Frequently Asked Questions
About Evan Kim
Digital content strategist and visual communication specialist based in South Korea. Focused on practical, precise solutions for creators.
Read more articles by Evan