Images account for nearly 50% of the average web page's total weight. Unoptimized images are the single biggest factor hurting your site's load time, Core Web Vitals scores, and ultimately your search rankings.
This guide covers everything you need to know about image optimization โ from choosing the right format to advanced compression techniques โ so your pages load fast without sacrificing visual quality.
Why Image Optimization Matters
Page speed impacts SEO: Google uses Core Web Vitals (LCP, FID, CLS) as direct ranking factors. Large, unoptimized images are the most common cause of poor Largest Contentful Paint (LCP) scores.
User experience: 53% of mobile users abandon pages that take more than 3 seconds to load. Every 100ms of load time improvement can increase conversion rates by up to 8%.
Bandwidth costs: For sites serving millions of pageviews, image optimization can reduce monthly bandwidth bills by thousands of dollars.
Understanding Image Formats
JPEG (JPG)
Best for photographs and images with complex color gradients. JPEG uses lossy compression โ it permanently removes some detail to achieve smaller file sizes. Quality 75โ85% is the sweet spot where files are significantly smaller with imperceptible quality loss.
PNG
Best for images requiring transparency or with sharp edges (logos, icons, screenshots). PNG uses lossless compression โ no quality is lost, but file sizes are typically larger than JPEG for photographic content.
WebP
Google's modern format that supports both lossy and lossless compression, transparency, and animation. WebP typically achieves 25โ34% better compression than JPEG and PNG at equivalent quality. Browser support is now near-universal at 97%+ globally.
AVIF
The newest format, based on the AV1 video codec. AVIF provides even better compression than WebP โ often 50% smaller than JPEG โ but encoding is slower and browser support is still growing (around 85% globally).
Compression: Lossy vs. Lossless
Lossy compression permanently removes "unnecessary" visual data that the human eye is less sensitive to. The key is finding the quality threshold where reduction is invisible. For most photographs, quality 75-85% is optimal.
Lossless compression reduces file size without any quality loss by improving how the data is stored. The reduction is typically smaller (10-30%) but preserves every pixel exactly.
You can experiment with both using our Image Compressor. The before/after comparison slider makes it easy to find the optimal quality threshold โ drag the slider to see exactly where quality loss becomes visible.
Responsive Images โ Serving the Right Size
One of the most impactful optimizations is serving appropriately sized images. A 4000ร3000 pixel image displayed at 400ร300 pixels wastes 99% of its data.
The srcset attribute: HTML's srcset lets browsers choose the optimal image size based on the viewport:
<img srcset="image-400w.jpg 400w, image-800w.jpg 800w, image-1200w.jpg 1200w" sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px" src="image-800w.jpg" alt="Description">
Our Image Compressor includes dimension presets (1K, Full HD, 2K, 4K) so you can quickly generate multiple sizes for responsive images.
Lazy Loading
Images below the fold shouldn't load until the user scrolls near them. The native loading="lazy" attribute does this automatically:
<img src="image.jpg" loading="lazy" alt="Description">
Important: Don't lazy load above-the-fold images. Your hero image or LCP element should load immediately with loading="eager" (or simply without the attribute) and use fetchpriority="high".
Modern Delivery โ CDN and Caching
Content Delivery Networks (CDNs) serve images from servers geographically close to users. Services like Cloudflare, Vercel, and AWS CloudFront can also automatically convert images to WebP/AVIF and resize them on the fly.
Cache headers: Set long cache durations (e.g., Cache-Control: public, max-age=31536000, immutable) for images and use content-hash filenames for cache busting.
Step-by-Step Optimization Workflow
Step 1: Export from your design tool at 2ร the display size for retina screens.
Step 2: Compress using our Image Compressor at quality 80%. Use the before/after slider to verify quality is acceptable.
Step 3: Generate multiple sizes (400w, 800w, 1200w, 1600w) using the dimension presets.
Step 4: Convert to WebP format for browsers that support it, with JPEG fallback.
Step 5: Add loading="lazy" to below-fold images and fetchpriority="high" to the LCP image.
Step 6: Implement responsive srcset and sizes attributes.
Measuring Results
After optimization, measure the impact:
Google PageSpeed Insights: Check your Core Web Vitals scores, particularly LCP. The tool will flag any remaining unoptimized images.
WebPageTest.org: Run a detailed waterfall analysis to see exactly how long each image takes to load.
Chrome DevTools Network tab: Sort by size and type to identify remaining large images.
You can also use our File Size Calculator to understand the exact savings in different units โ bytes, kilobytes, megabytes.
Conclusion
Image optimization is the highest-impact performance improvement most websites can make. Start by compressing your existing images with our Image Compressor, implement responsive images with srcset, add lazy loading, and serve modern formats. Your users โ and your search rankings โ will thank you.

