Fix guides · Performance
How to fix “Improve image delivery”: smaller, faster images
Images are the heaviest part of most web pages. How to resize, compress and serve them in modern formats on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js, without losing quality.
- Time to fix
- 20–60 minutes
- Skill needed
- No code
- Who notices
- Every visitor, especially on mobile data
Why it matters
Large images take the longest to download, so they decide how quickly your page looks ready. That moment is measured as Largest Contentful Paint (LCP), one of Google's Core Web Vitals.
The usual causes are images far bigger than the space they fill, files that aren't compressed, and older formats (JPEG, PNG) where WebP or AVIF would be much smaller.
“Images accounted for the most bytes on both mobile and desktop, followed by JavaScript and fonts.”
Before you start
- Your report lists each image and how much it could save. Start with the biggest.
- Size images for where they're shown: about twice the width they display at is plenty for sharp screens. A 6000-pixel camera photo in a 600-pixel space wastes most of its weight.
- Use photos as JPEG, WebP or AVIF, not PNG. Keep PNG and SVG for logos and graphics with sharp edges.
- Don't lazy-load the main image at the top of the page; it should load first.
Fix it on your platform
Shopify
- Shopify's image CDN already picks a modern format (like WebP or AVIF) for each visitor's browser, so you don't need to convert files yourself.
- Flagged images are usually requested at a much larger width than they're shown, often by an app or by older theme code. Check which images your report lists.
- In theme code, request a sensible width with image_url and output it with image_tag, which adds a responsive srcset by default. Ask app developers about images their app adds.
{{ section.settings.image | image_url: width: 1600 | image_tag: sizes: '100vw' }}WordPress
- Compress large photos before uploading (any image editor or a free tool like Squoosh works).
- In the Image block's Settings tab, pick a Resolution that fits the space (Large or Medium) instead of Full Size.
- For WebP and AVIF, install Modern Image Formats, the plugin from the WordPress Performance Team, then re-upload or regenerate key images.
- Images from your theme, sliders or page builders follow those tools' settings; check them for an image size or optimization option.
Webflow
- Open the Assets panel, expand it, select the images and convert them to WebP or AVIF with Webflow's image conversion tool.
- Conversion replaces the original file, so download a copy first if you might need it.
- CMS images are converted separately, from the collection's more options menu (Compress assets). Republish afterwards.
Wix
- Wix resizes images and serves them in modern formats automatically for images you add in the editor.
- If images are still flagged, upload smaller files: resize very large photos before uploading, and avoid PNG for photos.
- Images in custom code or embedded apps aren't optimized by Wix; resize and compress those yourself.
Squarespace
- Squarespace converts uploaded images to WebP by default. Check it hasn't been turned off in the Image Settings panel.
- Squarespace recommends uploading images of 500 KB or less, between 1500 and 2500 pixels wide. Resize and compress larger files before uploading.
- Keep each page's total size down: its help center suggests 5 MB or less.
Next.js
- Use next/image: it resizes on demand, serves WebP by default (add AVIF in next.config), and generates srcset for you.
- Set sizes on images that aren't full width, so phones don't download desktop sizes. On the main image at the top of the page, set loading="eager" and fetchPriority="high" (the old priority prop is deprecated in Next.js 16).
- Plain <img> tags skip all of this; switch them to next/image.
<Image src={hero} alt="…" sizes="100vw" loading="eager" fetchPriority="high" />
<Image src={card} alt="…" sizes="(min-width: 1024px) 33vw, 100vw" />images: {
formats: ["image/avif", "image/webp"],
},Any other site
- Export images at the size they're displayed (about twice the width for sharp screens) and compress them.
- Serve modern formats with a <picture> element, and let the browser pick a size with srcset and sizes.
<picture>
<source type="image/avif" srcset="hero-800.avif 800w, hero-1600.avif 1600w" sizes="100vw">
<source type="image/webp" srcset="hero-800.webp 800w, hero-1600.webp 1600w" sizes="100vw">
<img src="hero-1600.jpg" width="1600" height="900" alt="…">
</picture>Check that it's fixed
- Re-run your StudioLNC audit: the estimated savings for image delivery should drop, or the issue should be gone.
- Your Largest Contentful Paint in Core Web Vitals improves for real visitors over the following four weeks.
Find every issue like this on your site
Free audit of performance, accessibility, SEO and security, with fixes for your platform.