How to Reduce Image File Size Without Losing Quality: The Complete Guide
Why Image Size Matters More Than Ever
Google's Core Web Vitals — a set of user experience metrics that directly influence search rankings since 2021 — are heavily affected by image loading performance. Specifically, the Largest Contentful Paint (LCP) metric measures how long it takes for the largest visible element on a page (usually an image) to load. A slow LCP score can push you down search rankings even if your content is excellent.
Beyond SEO, there's a direct business case: for every 100ms improvement in page load time, e-commerce conversion rates improve by approximately 1%, according to data from Deloitte Digital. Images are the largest lever available for most websites.
Step 1: Choose the Right Image Format
Before thinking about compression, format selection is the most impactful decision:
- WebP — The best default choice for web images. 25–35% smaller than JPEG at equivalent quality. Supports transparency and animation. Supported by all modern browsers.
- AVIF — The most efficient format available (40–50% smaller than JPEG). Best for high-traffic sites. Slightly slower to encode than WebP.
- JPEG — Use only as a fallback for browsers that don't support WebP/AVIF, or for print-quality exports.
- PNG — Only when you need lossless compression AND transparency (logos, icons with transparent backgrounds, screenshots containing text).
- SVG — Always for icons, logos, and illustrations — infinitely scalable with tiny file sizes.
- GIF — Avoid for animations. Use WebP or MP4 video instead — GIF is the most inefficient animated format.
Use Flixfer's free WebP Converter to convert your existing JPEG/PNG images to WebP instantly in your browser.
Step 2: Resize Images to the Display Dimensions
One of the most common and wasteful mistakes is serving images at their original camera resolution when they will be displayed at a fraction of that size. A 4000×3000px photograph embedded in a 800px-wide blog post column is transferring 25× more pixel data than necessary.
Always resize images to their maximum display dimensions before optimising. Use Flixfer's Image Resizer to set exact pixel dimensions without distortion.
For responsive websites, use the HTML srcset attribute to serve appropriately sized images to different viewport sizes:
<img
src="image-800.webp"
srcset="image-400.webp 400w, image-800.webp 800w, image-1200.webp 1200w"
sizes="(max-width: 600px) 400px, (max-width: 900px) 800px, 1200px"
alt="Description"
/>
Step 3: Compress — Find Your Quality Sweet Spot
Compression quality settings exist on a spectrum. The goal is to find the lowest quality setting at which the image looks identical to the human eye at its actual display size.
General guidelines for quality settings:
| Use Case | Recommended Quality | Notes |
|---|---|---|
| Blog post images | 75–80% | Visually lossless at typical screen sizes |
| E-commerce product photos | 80–85% | Higher quality for detail-inspected images |
| Hero / full-width images | 70–80% | Large display means more visible compression |
| Thumbnails | 60–70% | Small size hides compression artefacts |
| Portfolio / photography | 85–90% | Quality showcase demands minimal compression |
Use Flixfer's Image Compressor with its live side-by-side preview to find your exact quality threshold before committing to a compression level.
Step 4: Implement Lazy Loading
Images below the fold (not visible until the user scrolls down) should not be loaded until they are needed. Add loading="lazy" to all non-critical images:
<img src="below-fold.webp" alt="Description" loading="lazy">
This is supported natively by all modern browsers and requires no JavaScript library. It can dramatically reduce initial page load time by deferring the loading of 60–80% of a typical page's images.
Step 5: Use the HTML Picture Element for Format Fallbacks
To serve AVIF to supporting browsers, WebP as a fallback, and JPEG to older browsers:
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Description" loading="lazy">
</picture>
This progressive enhancement approach ensures every user gets the optimal format for their browser without any additional logic.
Quick Reference: Image Optimisation Checklist
- ✅ Choose the right format (WebP first, AVIF if available, PNG for lossless transparency, SVG for icons)
- ✅ Resize to actual display dimensions — never serve an image larger than it will be displayed
- ✅ Compress at appropriate quality level using a live-preview tool
- ✅ Add
loading="lazy"to below-fold images - ✅ Use
srcsetand<picture>for responsive images - ✅ Specify explicit width and height attributes to prevent layout shift
- ✅ Write descriptive alt text for both accessibility and SEO