Prompt
How do I make my site images load faster on mobile?
Latest observation
Here are the biggest wins to make site images load faster on mobile:
1. Use the right image format
- AVIF: best compression, usually smallest files
- WebP: widely supported, very good balance
- JPEG: for photos if AVIF/WebP aren’t available
- PNG: only when you need transparency or sharp graphics
- SVG: for logos, icons, and simple illustrations
2. Serve smaller images for mobile
Don’t send a giant desktop image to a phone.
Use responsive images with srcset and sizes, for example:
<img
src="image-800.jpg"
srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
sizes="(max-width: 600px) 400px, 800px"
alt="Example"
/>
3. Compress images
- Re-export images at lower file sizes
- Use tools like:
- TinyPNG / TinyJPG
- Squoosh
- ImageOptim
- Remove unnecessary metadata
4. Resize images before uploading
If an image displays at 600px wide, don’t upload a 3000px version unless you need it for high-DPI screens.
5. Lazy-load below-the-fold images
Only load images when the user scrolls near them:
<img src="image.jpg" loading="lazy" alt="Example">
Avoid lazy-loading the main hero image if it’s above the fold.
6. Use caching
Set long cache lifetimes for static images so repeat visits are faster.
7. Use a CDN
A CDN can serve images from locations closer to users, reducing latency.
8. Optimize delivery
- Use HTTP/2 or HTTP/3
- Enable compression where applicable
- Make sure image files are cacheable
9. Consider modern image services
If possible, use image CDNs or build tools that automatically:
- resize images
- convert to WebP/AVIF
- serve the best size per device
10. Prioritize the most important image
For the main visible image:
- preload it if necessary
- avoid lazy-loading it
- keep it small and well-compressed
Example:
<link rel="preload" as="image" href="hero.avif">
Quick checklist
- Convert to AVIF/WebP
- Resize to display dimensions
- Use
srcset/sizes - Lazy-load offscreen images
- Compress and strip metadata
- Use caching + CDN
If you want, I can also help you audit your current image setup or give you a copy-paste responsive image implementation for your stack (HTML, React, Next.js, WordPress, etc.).