Image Optimization for Websites: the Right Format, the Right Size, Light Compression
Published · Updated
To optimize images for a website, do three things: save them in a modern format (WebP or AVIF), resize them to the size they are shown at, and compress them moderately. A multi-megabyte photo uploaded straight from a phone is a common reason a page feels slow, and fixing it needs no photo-editing software.
Why image size matters
Google measures page experience with Core Web Vitals. One of them, LCP (Largest Contentful Paint), tracks how quickly the largest visible element on the page loads, and that element is often an image. According to Google's web performance guidance, a good LCP is 2.5 seconds or less and a poor one is over 4 seconds (checked October 2026).
Google's Search documentation (checked October 2026) says good Core Web Vitals align with what its ranking systems seek to reward, but they are only one part of page experience. Speed won't replace good content, but a slow page loses visitors, especially on mobile networks.
1. Pick the right format
| Format | When | Notes |
|---|---|---|
| WebP | Almost every image on the page | Google says lossy WebP is 25–34% smaller than comparable JPEG, and lossless WebP 26% smaller than PNG |
| AVIF | When you want even smaller files | Works in Chrome 85+, Firefox 93+, Safari 16.4+ and Edge 121+; about 96% of users according to the Can I use browser-support tables |
| JPEG | Photos, when a system won't accept WebP | No transparency |
| PNG | Logos and graphics that need transparency | Too heavy for photos |
| SVG | Logos and icons as vectors | Scales with no loss of quality |
Figures checked on Google's WebP page and the Can I use browser-support tables in October 2026.
For most sites the single biggest win is converting JPEG and PNG images to WebP. A modern site platform can do this automatically. Otherwise you can convert in the browser, for example with Listiq AI's PNG to WebP converter or JPG to WebP converter. No signup is needed, and you can convert up to 20 images at a time.
2. Size the image to its display size
A common mistake is uploading a 4000-pixel-wide image that is shown at 800 pixels. The browser still downloads the whole file.
Rules of thumb for width:
| Use | Width |
|---|---|
| Hero or banner image | 1600–1920 px |
| Content image in an article | 800–1200 px |
| Online store product photo | 1000–1600 px |
| Thumbnail | about 400 px |
Better still, offer the same image in a few sizes (srcset and sizes) so a phone downloads the small version and a large screen the large one. You can also resize in the browser: the image resizer keeps the aspect ratio and never upscales.
3. Compress moderately
For WebP and JPEG, a quality setting of 80–85 is a good starting point: the file shrinks a lot and the difference is usually invisible. Check the result by eye, especially faces, text and flat areas of color. Rough targets:
- hero image under 200 KB
- regular content image under 100 KB
- thumbnail under 30 KB.
Pre-publish checklist
- WebP or AVIF – the biggest single saving.
- The right dimensions – don't let the browser shrink giant images.
- Width and height set (
widthandheight) – the page doesn't jump while images load. - Lazy-load only images further down –
loading="lazy"suits the lower part of the page, but Google's web performance guidance advises (checked October 2026) against lazy-loading images visible on load, especially the LCP image. - A descriptive file name –
office-oulu.webp, notIMG_4823.jpg. - Alt text – describes the image for screen readers and image search.
Listiq AI's free image tools
The converters and resizer above are part of Listiq AI's free image tools. Listiq AI is a service we built, so we say so plainly. The tools need no signup and add no watermark. The maximum size per image is 25 MB. There are converters for PNG, JPEG, HEIC, WebP, AVIF, SVG, GIF and TIFF images, and the output is JPEG, PNG, WebP or AVIF.
When images alone aren't enough
Images are often the quickest fix, but search visibility also depends on a page's structure, content and technical health. If you want your site to be found on Google and in AI search, see SEO and AI search optimization or get in touch.