Prompt
I'm trying to reduce product image weight for ecommerce while keeping detail
Latest observation
To reduce ecommerce product image weight without losing visible detail, focus on a mix of right-sizing, modern formats, smart compression, and delivery optimization.
Best practices
1) Resize images to actual display needs
Don’t serve a 4000px image if the largest on-page display is 1200px.
- Determine the largest rendered size on desktop and mobile
- Export a few responsive sizes, e.g.:
- 480px
- 800px
- 1200px
- 1600px only if needed for zoom
This often saves the most bytes immediately.
2) Use modern formats
Prefer:
- AVIF for smallest file sizes
- WebP as a strong fallback / widely supported option
- Keep JPEG as a fallback if needed for older systems
Typical result:
- JPEG: larger
- WebP: ~25–35% smaller than JPEG
- AVIF: often even smaller than WebP
3) Compress intelligently
For product photos, use lossy compression carefully.
Good starting points:
- JPEG quality: 70–82
- WebP quality: 65–80
- AVIF quality: 35–55 depending on encoder and image type
If your products have sharp edges, logos, text, or flat backgrounds, use slightly higher quality or a format/setting that preserves edges better.
4) Strip unnecessary metadata
Remove:
- EXIF
- camera info
- thumbnails
- location data
This is easy savings and helps privacy too.
5) Use responsive images on the site
Serve different sizes with srcset/sizes, so mobile users don’t download desktop-sized assets.
Example:
<img
src="product-800.webp"
srcset="
product-480.webp 480w,
product-800.webp 800w,
product-1200.webp 1200w,
product-1600.webp 1600w
"
sizes="(max-width: 768px) 100vw, 33vw"
alt="Product name"
/>
6) Optimize for product type
Different products need different treatment:
- Apparel / soft goods: more tolerant of compression
- Jewelry / cosmetics: need stronger detail retention
- Transparent backgrounds: use WebP/AVIF with alpha, or PNG only if necessary
- Text-heavy packaging: avoid aggressive compression; keep edges crisp
7) Use lazy loading
Load only what’s visible initially:
<img loading="lazy" decoding="async" ... />
8) Use a CDN or image service
Services like Cloudinary, Imgix, Fastly Image Optimizer, or similar can:
- resize on the fly
- auto-select format
- compress based on device
- cache globally
This is often the easiest way to maintain quality at scale.
A practical ecommerce image recipe
If you want a safe default:
- Master upload: high-quality original
- Store derivative sizes: 480 / 800 / 1200 / 1600
- Format: AVIF + WebP + JPEG fallback
- Strip metadata
- Quality target:
- WebP 75
- JPEG 80
- AVIF medium/high quality tuned by visual test
- Lazy-load below-the-fold images
Recommended workflow
- Take original image
- Crop and normalize dimensions
- Resize to target display sizes
- Convert to AVIF/WebP
- Compare side-by-side at 100% and on-page
- Keep the smallest version that looks identical to the customer
Watch-outs
- Don’t over-compress glossy or reflective products
- Don’t rely on PNG unless you need transparency or pixel-perfect graphics
- Don’t upscale small images
- Test on retina screens and real mobile devices
If you want, I can also give you:
- a Photoshop / Figma export preset,
- a Node.js script for batch optimization, or
- a CDN-based setup for Shopify/WooCommerce/custom sites.