Heavy images are the most common reason a page loads slowly. Google’s own image guidance says images are often the largest contributor to overall page size, which can make pages slow and expensive to load, and slow pages cost you visitors before they read a word. The fix is not one magic setting but a simple order of operations: pixel size first, format second, quality last. This guide walks through each step, with numbers you can use and the HTML that makes the browser do the rest.
Why it is worth the effort
Google recommends that sites aim for a Largest Contentful Paint (the time until the biggest visible element is drawn, very often a photo) of 2.5 seconds or less, measured at the 75th percentile of visits across mobile and desktop. It also states that its core ranking systems seek to reward a good page experience, of which Core Web Vitals are a part. Relevance still comes first, and a fast page with weak content will not outrank a slow page with the best answer. But among pages that answer the question equally well, the one that loads quickly keeps more visitors, and visitors who stay are good for everything else you care about.
1. Resize to the size it is shown
A modern phone takes photos around 4000 pixels wide. A blog column is usually 700–900 CSS pixels wide, and even on a high-density screen you rarely need more than twice that. Serving a 4000-pixel photo in an 800-pixel slot wastes most of the bytes before compression even starts. The saving is bigger than it looks: a 4032 × 3024 photo has 12,192,768 pixels, while the same photo at 1600 × 1200 has 1,920,000, only about 16% as many.
| Slot | Good width to export |
|---|---|
| Content image in an article | 1200–1600 px |
| Full-width hero | 1920–2400 px |
| Card or thumbnail | 400–800 px |
| Logo | SVG if possible; otherwise 2× its displayed size |
The “2×” reasoning: a screen with twice the pixel density draws two physical pixels for every CSS pixel, so a slot that is 800 CSS pixels wide looks sharp with a 1600-pixel image. Beyond 2× you are adding bytes the eye cannot use. Use the image resizer or the bulk resizer for a whole folder, and never enlarge a small image: upscaling cannot add detail, it only adds bytes.
2. Choose the format by content
- Photos: WebP, with JPG as the fallback for older systems. Google reports lossy WebP images are 25–34% smaller than comparable JPEGs at equivalent quality.
- Screenshots, diagrams, text: PNG with a reduced palette, or lossless WebP, which Google reports as 26% smaller than PNG.
- Logos and icons: SVG. Run it through the SVG optimizer.
More in JPG, PNG or WebP?, and if you want to know why these formats behave so differently, how image compression works explains it.
3. Set quality last, and check it
For photos, 70–80% quality is a common working range, and in everyday viewing the result is hard to tell from the original. That is a rule of thumb, not a law: it depends on the picture. Compare before and after at 100% zoom on the areas people look at: faces, text and product edges. If something softens, go up five points. The image compressor has a before and after view for exactly this. Quality also has diminishing returns: past a certain point each point you give up saves fewer bytes and costs more visible damage, which is why resizing comes first.
4. Set a budget per image
A useful rule of thumb is under 200 KB for a large content image and under 100 KB for most others. If you work to a budget, the exact-size tool finds the best quality that fits automatically, so you do not have to guess a slider value for every picture. A page-level budget is even better: decide the total image weight you will accept (say 500 KB above the fold) and work backwards.
5. Let the browser help
Good files still need good HTML. Three habits cover most of it:
- Add
widthandheightattributes so the browser can reserve space and the page does not jump while images load. Google’s guideline for Cumulative Layout Shift is a score of 0.1 or less. - Lazy-load images below the fold, never the main one.
loading="lazy"delays an image until it is near the viewport. Google’s web.dev guidance warns that setting it on your largest above-the-fold image can delay your Largest Contentful Paint. - Offer several sizes with
srcsetso phones download a smaller file than desktops.
Google’s documentation gives patterns you can copy. A responsive image with a fallback src:
<img srcset="cat-320w.jpg 320w, cat-480w.jpg 480w, cat-800w.jpg 800w"
sizes="(max-width: 320px) 280px, (max-width: 480px) 440px, 800px"
src="cat-800w.jpg" width="800" height="600"
alt="A grey cat asleep on a windowsill">
And a modern format with a safe fallback, using the picture element:
<picture>
<source type="image/webp" srcset="pyramid.webp">
<img src="pyramid.jpg" alt="An oil painting of the Great Pyramid">
</picture>
Google adds that some crawlers and browsers do not understand srcset, so always include a plain src fallback, as in both examples.
6. Name and describe images properly
Speed is half the job. Google’s image guidance recommends short, descriptive file names (my-new-black-kitten.jpg rather than IMG00023.JPG) and calls alt text the most important attribute for image metadata. Alt text also helps people who use screen readers or have low-bandwidth connections. Write it for a person: describe the picture in context, and avoid stuffing it with keywords, which Google warns can make a site look like spam. Rename the files before you upload; it takes seconds and the benefit lasts.
A worked example
You have a 4032 × 3024 phone photo for a blog post, shown 800 pixels wide on desktop.
- Resize to 1600 pixels wide (1600 × 1200). The picture now has about 16% of its original pixels.
- Choose WebP, with a JPG copy for the fallback.
- Run it through the exact-size tool with a 150 KB budget and check the face and any text in the photo at 100% zoom.
- Name it
harbour-sunset-lagos.webp, write the alt text, setwidth="1600" height="1200", and skip lazy-loading if it is the top image on the page.
Common mistakes
- Compressing a thumbnail from a huge original. The browser still has to download the huge file. Make a real small version.
- Compressing a JPG that is already compressed, repeatedly. Each lossy save costs a little. Start from the original.
- Using PNG for photographs. It is lossless, so photos come out very large. Reserve it for graphics.
- Renaming
photo.pngtophoto.jpg. That changes the label, not the data. Convert properly with the format converter. - Stripping nothing. Phone photos carry location and camera data. For public pages, remove it with the EXIF and GPS remover.
Quick checklist
- Resized to the display size (×2 for sharp screens).
- WebP or JPG for photos, PNG/SVG for graphics.
- Quality 70–80% and visually checked.
- Under your size budget.
- Width, height, alt text and a descriptive file name set in the HTML.
- Main image not lazy-loaded; everything below the fold lazy-loaded.
Sources
Checked 6 December 2026. Limits and policies change, so the provider’s own page always wins.
- Google Search Central: Image SEO best practices (page size, srcset, picture, file names, alt text)
- web.dev: Largest Contentful Paint (2.5 seconds or less at the 75th percentile)
- web.dev: Cumulative Layout Shift (0.1 or less)
- web.dev: Optimize Largest Contentful Paint (lazy-loading the LCP image delays it)
- Google Search Central: Core Web Vitals and Google Search results
- Google for Developers: WebP (26% smaller than PNG, 25 to 34% smaller than JPEG)
Frequently asked questions
What is the best image format for websites?
WebP for photos, with JPG as a fallback; SVG for logos and icons; PNG or lossless WebP for screenshots and diagrams. Google reports lossy WebP images are 25 to 34% smaller than comparable JPEGs.
What quality setting should I use?
For photos, 70 to 80% is a common starting point. Check faces, text and edges at 100% zoom, and raise it by five points if anything looks soft.
How big should a website image be in KB?
A common budget is under 200 KB for a large content image and under 100 KB for most others, but the right number depends on your page and your audience.