100% Client-Side Privacy: Zero files or data uploaded.
Technical SEO & Performance

How Client-Side Image Compression Improves Google Core Web Vitals and Page Load Speeds

August 28, 2026 • By Muhammad AbuBakar Azam 11 min read • Zero-Data Privacy Verified

Table of Contents

On most pages, the slowest thing is a picture. A single uncompressed hero image can weigh more than the rest of the page combined, and when that image is the largest thing on screen, it sets the page's Largest Contentful Paint — the Core Web Vitals metric Google uses to judge loading speed. Compressing images in your browser, before they ever reach a server, attacks the problem at its cheapest point: smaller files, no upload round-trip, and no copy of your images sitting on a third-party service. This guide explains what Google measures, which formats actually help, and how much faster a page gets when the images shrink.

A grid of photo thumbnails in a photo-editing app
A grid of photo thumbnails in a photo-editing app Photo: Håkan Dahlström from Malmö, Sweden, CC BY 2.0, via Wikimedia Commons

1. What Google Actually Measures

Core Web Vitals are three numbers Google collects from real visitors and uses as a ranking signal. Largest Contentful Paint (LCP) measures how long the biggest visible element — usually a hero image or a headline block — takes to appear; Google calls under 2.5 seconds good. Interaction to Next Paint (INP) measures how quickly the page responds when a visitor taps or clicks; under 200 milliseconds is good, and it replaced the older First Input Delay metric in March 2024. Cumulative Layout Shift (CLS) measures how much the page jumps around while it loads; a score under 0.1 is good. The scores come from the Chrome User Experience Report, which records the 75th percentile of real visits — so a page needs to be fast for most visitors, not just on your own connection.

Images touch all three. A heavy hero image delays LCP directly, because the browser cannot paint the largest element until its bytes arrive. Image work done on the main thread — decoding a huge file, or running a compressor in the page itself — can block taps and hurt INP. And an image without declared dimensions leaves the browser guessing how much space to reserve, so text jumps down the page when the image finally loads, which is CLS in its most common form. That is why image compression is not a cosmetic step. On image-led pages it is usually the single biggest lever on all three metrics at once.

The browser is the right place to do it. A client-side compressor reads the image with the File API, decodes it on a canvas, resizes and re-encodes it in memory, and hands you the smaller file to download. The original never uploads anywhere, which matters when the images are product photos, client work or anything unreleased — and it is faster, because there is no upload, no server queue and no download of the result. Heavy jobs can run in a Web Worker so the page stays responsive, which also protects INP while the compression itself runs.

2. Codecs and the 2.4 MB Worked Example

Four formats cover nearly every image on the web. JPEG is the old workhorse for photographs: lossy, universally supported, but inefficient by modern standards. PNG is lossless and the right choice for logos, icons and graphics with sharp edges or transparency — and the wrong choice for photographs, where its files are often several times larger than a JPEG of the same picture. WebP, Google's format, is typically 25% to 35% smaller than a comparable JPEG at the same visual quality, and it supports transparency and animation. AVIF goes further still, often coming in at roughly half the size of an equivalent JPEG, at the cost of slower encoding — which matters little when you compress once and serve the result thousands of times.

Format Best for Typical size vs JPEG Watch out for
JPEG Photographs, complex images Baseline (100%) No transparency; quality below 70 shows artefacts
PNG Logos, icons, sharp graphics Often 2 - 5× larger for photos Huge files if used for photographs
WebP Photographs and graphics on the modern web Roughly 65 - 75% of JPEG Very old browsers need a JPEG fallback
AVIF Hero images where every kilobyte counts Roughly 50% of JPEG Slower to encode; keep a WebP fallback

Now the worked example. Take a hero photograph straight from a camera: 2,400 × 1,600 pixels, saved as a JPEG at quality 95, weighing 2.4 MB. It is displayed at 1,200 pixels wide on the page, so half its pixels are never seen. Resize it to 1,200 pixels wide and re-encode as WebP at quality 80, and the file comes out at about 180 KB — a 92% reduction. The arithmetic of what that does to loading is simple: on a 10 Mbps connection, 2.4 MB is 19.2 megabits, which takes about 1.9 seconds of transfer alone; 180 KB is 1.44 megabits, which takes about 0.14 seconds. Same photograph, same visual quality to the eye, 1.8 seconds of LCP recovered before anything else on the page changes.

Two details make the example work. First, resizing matters as much as re-encoding: serving a 2,400-pixel image into a 1,200-pixel slot wastes half the bytes before compression even starts. Second, quality 80 is the sweet spot for most photographs — below 70, artefacts appear in skies and skin; above 90, the file grows fast for no visible gain. The right workflow is resize first, then compress at 75 to 85, then compare the result against the original at full screen. If you cannot see the difference, neither can your visitors.

3. A Bakery Site: Before and After

Sofia runs a bakery website with a hero photograph of her morning bake, a grid of twelve product photos, and a logo. Her PageSpeed report showed an LCP of 4.1 seconds on mobile and a CLS score of 0.18 — both failing Google's thresholds. The images were the cause: the hero was a 3.1 MB JPEG, the product photos averaged 900 KB each, and none of the images had width and height attributes, so the page reflowed as each one arrived.

Sofia's fix, in order:

Step 1 — Measure first: Sofia ran PageSpeed Insights and wrote down the three numbers: LCP 4.1 seconds, INP 120 milliseconds, CLS 0.18. Without the baseline, no improvement can be proven.

Step 2 — Compress in the browser: she dropped the hero and all twelve product photos into a client-side compressor, resized the hero to 1,200 pixels wide and the product shots to 800 pixels, and exported them as WebP at quality 80. The hero fell from 3.1 MB to about 210 KB; the product photos from 900 KB to about 90 KB each. Nothing uploaded anywhere — the originals stayed on her laptop.

Step 3 — Fix the layout shift: she added width and height attributes to every image tag, so the browser reserves the right space before the file arrives, and added a responsive srcset so phones get the 800-pixel version instead of the desktop file.

Step 4 — Measure again: LCP dropped to 1.9 seconds and CLS to 0.03 — both inside Google's good thresholds. Total image weight on the homepage fell from about 14 MB to about 1.3 MB. INP was already fine and stayed fine, because the compression ran in a Web Worker instead of blocking the page.

The lesson is not that WebP is magic. It is that the fix had three parts and all three were needed: smaller files for LCP, declared dimensions for CLS, and responsive sizes so mobile visitors do not download desktop images. Compressing alone would have fixed the loading time and left the layout jumping; dimensions alone would have fixed the jumping and left the page slow. Measure, compress, declare sizes, measure again — in that order.

4. Mistakes That Keep Pages Slow

Dozens of photo thumbnails in an editing app grid
Dozens of photo thumbnails in an editing app grid Photo: Håkan Dahlström from Malmö, Sweden, CC BY 2.0, via Wikimedia Commons

5. Your Compression Checklist

Work through this list for every image before it goes on a page, and re-run it whenever you redesign a template or change a hero image:

  1. Resize to the display size: if the image shows at 1,200 pixels wide, save it at 1,200 pixels (or twice that for retina screens, never more). Pixels nobody sees are bytes nobody needs.
  2. Pick the right format: WebP for photographs and most graphics, AVIF for hero images where size matters most, PNG only for logos and icons, JPEG as the fallback for very old browsers.
  3. Compress at quality 75 to 85: check the result at full screen against the original. If you cannot see the difference, ship the smaller file.
  4. Declare width and height on every image: and use srcset with two or three sizes so phones, tablets and desktops each get a file that fits.
  5. Measure LCP and CLS after every change: PageSpeed Insights is free and takes a minute. A compression job is only done when the numbers move.

6. How Google Judges Speed Now

Two things changed recently enough to matter. First, INP replaced First Input Delay as a Core Web Vital in March 2024, and it is a stricter test: it measures responsiveness across the whole visit, not just the first interaction, so a page that janks while images decode will show it. Second, Google's thresholds are judged on real-visitor data at the 75th percentile, which means a page that is fast on your office fibre and slow on a visitor's 4G connection fails. Both changes point the same way: do the heavy work — resizing, decoding, compression — before the visitor arrives, and keep the page itself light.

Format support has caught up with the advice. WebP is supported in every modern browser, and AVIF support is now broad enough for production use with a WebP fallback for the stragglers. There is no longer a compatibility reason to ship a 2.4 MB JPEG as a hero image. The remaining reason is usually habit — images exported at camera defaults and uploaded untouched. A five-minute compression pass in the browser fixes it, and the images never need to leave your machine to get there.

7. Questions People Ask About Image Speed

Does image compression really affect Google rankings?

Indirectly, but genuinely. Core Web Vitals are a ranking signal, and images are usually the largest part of a page. Shrinking them improves LCP and CLS, which improves the scores Google records from real visitors. It is not a substitute for good content, but a slow page with good content still loses to a fast page with good content.

Will visitors notice the quality drop?

Not at the settings in this guide. WebP at quality 80 is visually near-identical to a high-quality JPEG for photographs, at a quarter of the size or less. The artefacts people fear appear below quality 70, or when a small image is stretched large — both avoidable by resizing correctly and checking the result at full screen.

Should I compress images on my phone or my computer?

Either, as long as the tool runs in the browser. The advantage of a client-side compressor is that the originals never upload: on a phone, that also saves mobile data, since a 3 MB upload over 4G is slow and expensive. Compress first, then upload the small file wherever it needs to go.

8. The Short Version

Images are the heaviest part of most pages, and the cheapest part to fix. Resize to the size actually displayed, compress to WebP or AVIF at quality 75 to 85, declare width and height so the layout never jumps, and serve different sizes to different screens. In the worked example here, that took a hero image from 2.4 MB and 1.9 seconds of transfer to 180 KB and 0.14 seconds — the same photograph, 1.8 seconds faster.

Keep these three habits and your pages stay fast:

Try it now with the Image Compressor: drop in your heaviest image, resize it to its display size, export as WebP at quality 80, and compare the two files side by side. The difference in bytes is the difference in your LCP.

Interactive Utility

Compress Images Locally in Browser

Use our 100% private, client-side utility to perform instant calculations in your browser.

Launch Free Tool

Frequently Asked Questions

Detailed answers about image compression and Core Web Vitals.

What quality setting should I use when compressing images?
For photographs, 75 to 85 is the sweet spot — quality 80 is a good default. Below 70, artefacts start appearing in skies, gradients and skin. Above 90, the file grows quickly for almost no visible gain. Always compare the compressed result against the original at full screen before publishing.
Should I use WebP or AVIF?
WebP is the safe default: typically 25% to 35% smaller than JPEG at the same quality, with broad browser support. AVIF is smaller still — often around half the size of an equivalent JPEG — but slower to encode, so use it for hero images where every kilobyte counts, with a WebP fallback for older browsers.
Will compression make my images look worse?
Not if you stay in the 75 to 85 quality range and resize to the display size. The visible difference between a quality-95 JPEG and a quality-80 WebP is negligible on screen. What visitors do notice is a page that loads in two seconds instead of five — and a layout that does not jump while images arrive.
Does image compression help SEO?
Yes, through Core Web Vitals. Google measures LCP, INP and CLS from real visitors, and images are usually the largest factor in LCP and CLS. Smaller images load faster and shift the layout less, which improves the scores. It is one ranking factor among many, but it is one you control completely.
Can I compress images without uploading them anywhere?
Yes. A client-side compressor reads the image into your browser's memory, resizes and re-encodes it there, and gives you the smaller file to download. Nothing uploads, so there is no privacy risk for client photos or unreleased work, and no upload time wasted on a file you are about to shrink anyway.

Trusted Resources