Lazy Load Images
Lazy loading defers image downloads until they're about to enter the viewport, dramatically speeding up initial page load and reducing bandwidth.
How Lazy Loading Works
Traditional loading:
- User visits page
- Browser downloads ALL images on page (even those below the fold)
- Page render completes after all images downloaded
- User sees slow page load
Lazy loading:
- User visits page
- Browser downloads only images in viewport
- Page renders immediately
- As user scrolls, images load just before entering view
- Perceived performance is much faster
Performance Impact
Typical improvements from lazy loading:
| Metric | Improvement |
|---|---|
| Initial load time | 30-60% faster |
| First Contentful Paint (FCP) | 20-40% improvement |
| Largest Contentful Paint (LCP) | 15-30% improvement |
| Total bandwidth | 10-40% reduced |
| Page speed score | 5-15 points higher |
Especially effective on:
- Home pages with many images
- Blog/portfolio pages
- Image galleries
- WooCommerce product pages
- Long scrolling websites
Enabling Lazy Loading
- Go to Performance Toolkit → Media Optimization
- Check Lazy load images
- Click Save changes
- Test your site
That's it! The plugin automatically:
- Adds native lazy loading to all
<img>tags - Applies to images in posts, pages, and widgets
- Works across themes and plugins
- Falls back gracefully in older browsers
How it Works
The plugin adds the loading="lazy" attribute to images:
<!-- Before -->
<img src="image.jpg" alt="Description">
<!-- After -->
<img src="image.jpg" alt="Description" loading="lazy">
Modern browsers handle the rest automatically using native lazy loading APIs.
Browser Support
Native lazy loading (loading="lazy") is supported in:
- ✅ Chrome/Chromium (76+)
- ✅ Firefox (75+)
- ✅ Safari (15.1+)
- ✅ Edge (79+)
- ✅ Opera (63+)
In older browsers, the loading attribute is simply ignored and images load normally—no breaking.
What Gets Lazy Loaded
The plugin applies lazy loading to:
- ✅ Images in posts and pages
- ✅ Images in text widgets
- ✅ WooCommerce product images
- ✅ Gallery embeds
- ✅ Most image sources
Typically not lazy loaded (avoided to prevent breaking):
- ✅ Hero images above the fold
- ✅ Critical images in theme headers
- ✅ Images in plugin exclusion list
Fine-tuning Lazy Loading
Excluding Images
If certain images shouldn't be lazy loaded (critical hero images, etc.), you can exclude them.
Add these CSS classes to images that shouldn't lazy load:
no-lazyskip-lazyexcluded
Or in post HTML:
<img src="hero.jpg" class="no-lazy" alt="Hero">
<img src="below-fold.jpg" alt="Regular image"> <!-- lazy loaded -->
Iframe Lazy Loading
The plugin can also lazy load iframes (YouTube embeds, etc.):
Enable in Media Optimization settings if available.
Testing Lazy Loading
- Open DevTools — Right-click → Inspect
- Go to Network tab
- Reload page
- Watch images load — only images in viewport load initially
- Scroll down — more images load as they approach viewport
Expected behavior:
- Initial load: 2-3 images (or zero if page is below fold)
- As you scroll: more images load on demand
- Performance: each image loads when needed, not before
Combining with Other Optimizations
Lazy loading works great with:
- Page caching — cache static HTML with lazy attributes
- Image optimization — compress images for even faster load
- CDN — serve images from edge locations
- Minification — reduce HTML size
- Defer scripts — scripts load after visible content
Real-World Example
Before optimization:
- Product page loads 50 images
- Page load time: 8 seconds
- Bandwidth: 15 MB
With lazy loading enabled:
- Initial load: 3 images (above fold)
- Page load time: 2 seconds (75% faster!)
- Bandwidth on first load: 1 MB
- Additional images load as user scrolls
Troubleshooting
Images not showing
- Check browser console for errors
- Confirm
loading="lazy"attribute is present (inspect element) - Test in different browser
- Temporarily disable to confirm it's lazy load causing issue
Images loading too late
- Feeling is normal — lazy loading defers until image is about to enter view
- Can adjust with JavaScript if needed (advanced)
- Most users find experience better (page loads sooner)
Doesn't work in older browser
- Older browsers ignore
loadingattribute and load normally - No javascript fallback needed; graceful degradation
- Users with modern browsers get benefits
Plugin compatibility issues
- Most plugins are compatible
- If specific plugin images aren't lazy loading, may need exclusion
- Check plugin documentation
Best Practices
- ✅ Enable by default on all sites
- ✅ Test on product/gallery pages especially
- ✅ Combine with image compression for best results
- ✅ Monitor Core Web Vitals after enabling
- ✅ Use with page caching for maximum benefit
When NOT to Use
Rarely, you might want to disable lazy loading if:
- Very image-heavy immediately above-fold (unusual)
- Old browser compatibility critical (most have modern browsers)
- Static images never scroll to (use different approach)
In almost all cases, lazy loading provides clear benefits with no downsides.