Prompt
I'm trying to reduce page weight from hero images, what would you recommend?
Latest observation
Oct 27, 2026
OpenAI APIWeb search: off
To reduce page weight from hero images, I’d recommend focusing on format, dimensions, delivery, and loading behavior. The biggest wins usually come from these:
1) Serve the right file format
- Use AVIF first if supported: best compression, usually smallest files.
- Use WebP as a fallback: widely supported and much smaller than JPEG/PNG.
- Use JPEG only when needed for compatibility.
- Use SVG for logos/illustrations, not photos.
2) Resize to the actual display size
A lot of hero images are oversized.
- Don’t ship a 4000px-wide image if it displays at 1600px.
- Generate multiple sizes and use responsive images:
srcsetsizes
- Aim for the image to be close to the largest size it will ever display.
3) Compress aggressively
- For photographic heroes, target a good visual quality at the lowest file size.
- Usually:
- JPEG quality around 60–80
- WebP/AVIF can often go lower while still looking good
- Strip unnecessary metadata (EXIF, camera info, etc.).
4) Use responsive images correctly
Deliver different image sizes for different screens.
- Mobile users should not download desktop-sized hero assets.
- Example:
- small: 768px
- medium: 1280px
- large: 1920px
5) Lazy-load only when appropriate
- Do not lazy-load the above-the-fold hero image if it’s the main content element; that can hurt LCP.
- Instead:
- preload the hero image
- prioritize it with
fetchpriority="high"
6) Consider content-aware cropping
Instead of shrinking one giant image:
- Create separate crops for mobile vs desktop
- Keep the focal point visible
- This can reduce bytes and improve composition
7) Avoid using background images when possible
If it’s a content image, prefer <img> or <picture>:
- better responsiveness
- easier preloading
- better browser optimization
8) Use CDN/image optimization
A good image CDN can:
- auto-convert to AVIF/WebP
- resize on the fly
- cache efficiently
- serve device-appropriate versions
Examples: Cloudinary, Imgix, Fastly Image Optimizer, Akamai, etc.
9) Optimize the hero design itself
Sometimes the best savings are visual:
- Reduce complexity in the photo
- Use a simpler illustration or gradient background
- Replace a full-bleed photo with a partial image or abstract composition
Practical target
For a hero image, a good starting target is often:
- under 200–300 KB
- ideally smaller if possible, especially on mobile
Best-practice setup
Use:
- AVIF/WebP
- responsive sizes with
srcset - preloaded hero image
- no lazy-loading for the LCP hero
- a CDN or image optimizer
If you want, I can also show you:
- a recommended HTML
<picture>setup, or - a step-by-step checklist for auditing your current hero images.