Home » Speed & Mobile » Large Unoptimized Images: Cut Page Weight Without Losing Quality
Large Unoptimized Images: Cut Page Weight Without Losing Quality
Images are usually the heaviest part of a web page. A single photo from a modern phone can be 4 to 8 MB and 4000 pixels wide, uploaded to a page where it is shown at 800 pixels. Every visitor downloads the full file, and on a mobile connection that can take several seconds. Search engines measure this too, through the Largest Contentful Paint (LCP) metric, which is often an image.
Step 1: find the heavy images
- PageSpeed Insights (pagespeed.web.dev): look for "Properly size images", "Serve images in next-gen formats" and "Efficiently encode images". Each lists the files and the savings.
- DevTools Network tab: filter by Img, then sort by Size. Anything over about 200 KB deserves a look.
- The LCP element: Lighthouse names it. If it is an image, it is the most important one to fix.
Step 2: resize before upload
The biggest saving is simply not serving more pixels than needed.
| Use | Sensible maximum width |
|---|---|
| Full-width hero image | 1920–2400 px |
| Content image in an article column | 1200–1600 px |
| Thumbnails and cards | 400–800 px |
| Logos and icons | Use SVG where possible |
Resize with any image editor, or in bulk with free tools like Squoosh (squoosh.app) or command-line tools:
magick input.jpg -resize 1600x -quality 80 output.jpg
Step 3: compress and convert
- Photos: JPEG at quality 75–82 looks the same as 100 to most eyes at a fraction of the size. WebP or AVIF at similar settings are smaller again.
- Graphics with flat colour or transparency: PNG, or better, WebP. Convert simple icons and logos to SVG.
- Never use PNG for photographs; files are many times larger than JPEG.
In WordPress, plugins such as ShortPixel, Imagify, EWWW or Converter for Media compress uploads and generate WebP or AVIF versions automatically. Many CDNs (Cloudflare Images, Bunny Optimizer) convert on the fly.
Step 4: serve the right size to each screen
Responsive images let the browser pick a file that fits the device:
<img src="photo-800.jpg"
srcset="photo-400.jpg 400w, photo-800.jpg 800w, photo-1600.jpg 1600w"
sizes="(max-width: 700px) 100vw, 700px"
width="1600" height="1067"
alt="Server rack with network cables" loading="lazy">
WordPress generates srcset automatically for images inserted through the editor, as long as the original is large enough to have created smaller sizes.
Step 5: lazy-load and set dimensions
- Add
loading="lazy"to images below the first screen, so they load only when the visitor scrolls near them. - Do not lazy-load the main image at the top. Consider
fetchpriority="high"on it instead. - Always include
widthandheightattributes. The browser reserves the space before the image loads, preventing the page from jumping (layout shift).
Step 6: fix the backlog
New uploads are easy to handle with a plugin. For the existing library, run the plugin's bulk optimisation, or resize originals over a set width. Keep a backup first; bulk image tools occasionally fail on unusual files.
Common mistakes
- Uploading 5 MB photos and relying on CSS to shrink them.
- Lazy-loading the hero image, which delays the most important content.
- Leaving out width and height, causing content to jump as images arrive.
- Saving screenshots of text as JPEG, which blurs the text and is larger than PNG or WebP.
Frequently Asked Questions
What size should my images be?
No wider than the largest size they are displayed at, times two for high-density screens. A content image shown at 800 pixels wide needs a file around 1600 pixels wide at most, not a 6000-pixel original.
WebP or AVIF?
Both are much smaller than JPEG and PNG. WebP is supported everywhere and fast to encode. AVIF is often smaller still but slower to create. Either is a big improvement; serving both with a fallback is best.
Should I lazy-load every image?
No. Lazy-load images below the first screen. The main image at the top of the page (often the largest element) should load immediately, or the page will feel slower.
Found a mistake or still stuck? Contact us. See how we write and check these guides in our editorial policy, or read about DocumentGuy.