Opens in a new tab

Local SEO

Image compression: how to make images smaller without losing quality

Lossy and lossless compression, resizing before you compress, how Lighthouse checks your images and what it found on our own pages.

CheckedNovember 4, 2026
Reading time
Part ofWeb design
Listen to this guide
0:00 /5:02

Short answer: Image compression makes image files smaller so pages load faster. Resize each image to the size it is shown at, use lossy compression for photos and lossless for line art or text, and check the result before you publish.

Lossy and lossless compression

Compression What it does Best for Formats
Lossy Drops detail and some color information to shrink the file Photos and images with lots of detail JPEG, WebP, AVIF
Lossless Keeps every pixel and stores each one by its difference from its neighbors Line art, sharp edges and text GIF, PNG, WebP, AVIF

From web.dev’s “Image performance” guide, read November 4, 2026.

Lossy artifacts are hard to see in detailed photos, but they show around sharp edges and text. web.dev asks you to always confirm that a compressed image still meets your quality standard.

Resize before you compress

The first saving comes from the image’s dimensions. An image shown in a 500 pixel box only needs 500 pixels; a 1,000 pixel file is twice as large as needed.

Screens with a higher pixel density need more: twice the pixels on a 2x screen. On 3x screens, web.dev notes that most people can’t see the benefit, so a smaller file usually looks the same.

With the srcset attribute you list several versions of the same image, and the browser picks the one that fits the screen.

How to compress images for your website

  1. Pick the format: a photo as WebP or AVIF, a logo or icon as SVG or PNG.
  2. Resize the image to the largest size it is shown at, times the highest pixel density you want to serve.
  3. Compress it with a tool such as Squoosh or ImageOptim.
  4. Try a few quality levels and keep the smallest file that still looks right.
  5. Look at the result at full size, around edges, text and skin tones.
  6. Add srcset so phones get a smaller version than large screens.
  7. Run PageSpeed Insights and check what Lighthouse still flags.

Our WebP guide covers the format we use for our own photos, and our PNG, JPG or SVG guide covers the rest.

How Lighthouse checks your images

Lighthouse compresses each JPEG or BMP image on the page at a level of 85 and compares it with the original. If the saving is 4 KiB or more, it flags the image.

It also compares each image with the size it is rendered at, counting the screen’s pixel density, and flags it when the difference is 4 KiB or more. Since Lighthouse 13, both checks are part of its “Improve image delivery” insight.

What Lighthouse found on our own pages

On November 4, 2026, we ran four of our pages through PageSpeed Insights, on mobile and on desktop. Lighthouse estimated that better image delivery would save 191 KiB on mobile and 154 KiB on desktop across the four.

Most of that was size. On the mobile home, seven images of our photo wall are 480 pixels wide for a 189 pixel box. Our logo, a PNG, was flagged on every page for being larger than it is shown.

Compression came up for only three distinct images, the logo among them. Across five of our pages, 31 of the 32 image files were already WebP; the other one was the logo.

Before you upload an image

  • The format suits the content: photo or line art.
  • The file is no larger than the biggest size it is shown at.
  • The quality was chosen by eye, not left at the default.
  • Edges, text and faces still look clean at full size.
  • Phones get a smaller version through srcset.
  • PageSpeed Insights shows no image left to fix.

RememberOn our pages, resizing would save more than any quality setting. Fix the size before you touch the quality.

Image weight is one of the things our web design team checks before a page goes live.

Quick answers about image compression

What is image compression?

Making an image file smaller. Lossy compression drops detail you are unlikely to notice, which works best on photos. Lossless compression keeps every pixel, which matters for line art, sharp edges and text.

What quality setting should I use?

No single setting fits every image. Try a few levels and keep the smallest file that still looks right to you. For reference, Lighthouse tests JPEG images at a compression level of 85.

What size should a website image be?

The size it is shown at, times the screen’s pixel density: an image shown 500 pixels wide needs 1,000 pixels on a 2x screen. On 3x screens, most people can’t tell a smaller file apart.

Which tools compress images?

Squoosh, from Google’s web team, and ImageOptim both work for a small site. Image optimization services and plugins for systems such as WordPress can compress images as you upload them.

How do I know if my images are too heavy?

Run PageSpeed Insights on the page. Lighthouse lists the images worth fixing with their estimated savings, and flags an image when resizing or compressing it would save at least 4 KiB.

Sources

Read on November 4, 2026. web.dev: Image performance. Lighthouse: Efficiently encode images and Properly size images. MDN: Image file type and format guide. Our case: four of our pages in PageSpeed Insights and five read in a browser on November 4, 2026.

Pedro Galindez

Pedro Galindez

Founder of Feedback Studios, a bilingual growth studio in Miami.

Listen0:00 /5:02

More guides

Checked November 4, 2026

Website caching: how page caching speeds up your site

What page caching does, what to cache and what to skip, how to set it up on WordPress and how our own page cache works.

Checked November 4, 2026

Browser caching: what it is and how to set cache headers

What browser caching is, which Cache-Control to use for each kind of file, how to set it up and check it, and what we changed on our site.

Checked November 4, 2026

Website speed: how to make your site load faster

Why website speed matters, what slows a page, how to speed it up step by step, lab tests and real visits, and what we measured and fixed on our site.

Checked November 3, 2026

YouTube ads: the formats, how you pay and how to start

How YouTube ads work, the six formats with their length and what you pay for, how to run your first one and our own videos against the limits.

Checked November 3, 2026

SMS marketing for a small business: consent, the first text and opt-outs

What SMS marketing needs before the first text: consent by type of message, the sign-up wording, the confirmation text, STOP and our own form.

Checked November 3, 2026

Meta Ad Library: how to see any page’s Facebook and Instagram ads

What the Meta Ad Library shows for any active ad and for political ads, how to search it and what it shows for our own page.

Next step

Tell us what you need

Write to us on WhatsApp or send us a message. We answer in English or Spanish.