Skip to content
Let’s Talk
Guides

Website Image Optimisation: How to Compress, Size and Describe Images for Speed and SEO

A UK guide to website image optimisation: choosing formats, resizing, compression, lazy loading, alt text and file names for faster pages and search visibility.

By the Prism Works Studio team · · 7 min read

Key takeaways

  • Images are often among the largest files on a page, so optimising them is one of the simplest ways to improve speed.
  • Resize images to the dimensions they are displayed at, choose a suitable format and compress them sensibly.
  • Descriptive alt text and file names help accessibility and image search, alongside speed.

Images make websites more engaging, but they are also one of the most common reasons pages load slowly. A photo uploaded straight from a camera or phone can be far larger than it needs to be, and a page with several of them can feel sluggish, particularly on mobile connections. Optimising images is one of the most practical improvements most websites can make, and much of it can be done without specialist tools.

This guide explains how to choose image formats, size and compress images, load them efficiently and describe them properly for accessibility and search.

Why image optimisation matters

  • Speed: smaller image files mean pages load faster, which helps visitors stay.
  • Core Web Vitals: the largest element on many pages is an image, so it can directly affect Largest Contentful Paint. Our Core Web Vitals guide explains this metric.
  • Accessibility: alt text lets people using screen readers understand meaningful images.
  • Search visibility: well-described images can appear in image search and help search engines understand the page.

Choose the right format

Different formats suit different images:

FormatTypically suits
JPEGPhotographs, where small losses in quality are not noticeable
PNGGraphics needing transparency or sharp edges, such as some logos and screenshots
WebPA modern format offering good compression for photos and graphics, widely supported by current browsers
AVIFA newer format that can compress further still; worth checking support on your platform
SVGSimple vector graphics such as icons and many logos, which scale without losing sharpness

Many platforms and content delivery networks can serve modern formats automatically. Check what your website platform does before converting files by hand.

Resize before you upload

A common problem is uploading an image several thousand pixels wide and displaying it in a space a fraction of that size. The browser still downloads the full file. Resize images to roughly the largest size they will actually be displayed at, allowing for high-resolution screens, before uploading.

Responsive images go a step further by offering several sizes so each device downloads an appropriate one. Many platforms, including WordPress and Shopify, generate these automatically, but custom templates may need to be set up to use them properly.

Compress sensibly

Compression reduces file size. Lossy compression removes some detail and can shrink photos considerably with little visible difference; lossless compression keeps every detail but saves less. For most photographs, moderate lossy compression is a good balance. Check the result at normal viewing size, as over-compression can make images look blotchy, which undermines a professional impression, especially on product photos.

Desktop tools, online services and platform plugins can all compress images. Whichever you use, keep your original high-quality files somewhere safe so you can re-export later.

Load images efficiently

  • Lazy loading delays images further down the page until the visitor scrolls near them. Modern browsers support this natively.
  • Do not lazy load the main image at the top of the page, as this can delay it and hurt Largest Contentful Paint.
  • Set width and height attributes, or reserve space with CSS, so the layout does not jump as images load. This helps Cumulative Layout Shift.
  • Use a content delivery network where appropriate, so images are served from locations closer to visitors.
  • Be wary of large sliders and background videos, which can add significant weight for limited benefit.

Write useful alt text

Alt text describes an image for people who cannot see it and for search engines. Good alt text is concise and describes what matters about the image in context. For a product photo, that might be the product name, colour and angle. For decorative images that add no information, an empty alt attribute is usually appropriate so screen readers skip them.

Avoid stuffing alt text with keywords; write for the person reading it. Our website accessibility guide covers this in more depth.

Use descriptive file names

A file called IMG_4821.jpg tells search engines nothing. Rename files descriptively before uploading, using lowercase words separated by hyphens, such as oak-dining-table-natural.jpg. It is a small step, but it also keeps a media library organised.

Image optimisation for online shops

Ecommerce sites often have hundreds or thousands of images, so consistency matters. Agree standard dimensions, formats and naming conventions for product photography, and check that your platform generates responsive sizes. Zoom features may need larger files, so consider loading those only when requested. Our ecommerce product photography guide covers capturing images, and our Shopify speed optimisation guide covers platform-specific points.

Auditing existing images

To find problem images on an existing site, run key pages through a page speed testing tool, which will usually flag oversized or poorly compressed images. Prioritise templates used across many pages, such as product, category and blog templates, and your homepage, as fixes there have the widest effect.

Platform-specific considerations

How you optimise images depends partly on your website platform:

  • WordPress creates several sizes of each uploaded image and uses them for responsive images in many themes. Image optimisation plugins can compress uploads and convert to modern formats, but too many overlapping plugins can cause conflicts, so choose carefully. Our WordPress hosting guide covers related performance points.
  • Shopify serves images through its own content delivery network and can deliver modern formats automatically, but themes still need to request appropriate sizes, and large uploads remain a common issue.
  • Website builders often handle compression automatically, with less control over the details. Uploading sensibly sized images still helps.
  • Custom builds give full control but require developers to set up responsive images, formats and lazy loading deliberately.

Building an image workflow

Optimising images once is useful; making it part of how content is published is better. A simple workflow might include:

  1. Keep original, high-quality files in a safe archive.
  2. Export a web version at an agreed maximum size for each type of image, such as blog headers, product photos or team photos.
  3. Compress the web version and check it looks right.
  4. Rename the file descriptively.
  5. Upload, then add alt text in the platform.

Writing these steps down, with agreed dimensions, makes it easier for anyone updating the site to follow them. This is especially useful when several people add content, or when content is added infrequently and steps are easy to forget.

Image SEO beyond the basics

Alongside alt text and file names, a few other points help search engines understand your images:

  • Place images near relevant text, so the context is clear.
  • Use captions where they genuinely help readers.
  • Make sure important images are not blocked from crawling.
  • Consider including images in your XML sitemap if your platform supports it.
  • Use original images where possible, as these can be more distinctive than widely used stock photos.

Structured data for products can also include images, which may help them appear in shopping-related search features. Our schema markup guide explains how this works.

Balancing quality and speed

Optimisation is a balance, not a race to the smallest possible file. A luxury brand or photographer may reasonably accept slightly larger files for higher visual quality, while an information-heavy site might prioritise speed. Test key pages on a typical mobile connection and judge whether images look good enough and load quickly enough for your visitors.

Common mistakes

  • Uploading full-size camera images.
  • Over-compressing product photos until they look poor.
  • Lazy loading the hero image.
  • Leaving alt text empty on meaningful images, or stuffing it with keywords.
  • Using PNG for large photographs.
  • Deleting original files after compressing them.

How Prism Works Studio can help

Prism Works Studio builds and improves websites and online shops for UK businesses, working remotely across the UK. We can review how images are handled on your site and recommend changes as part of a speed or website project, with scope agreed with you. Read our website speed optimisation guide, explore our website and ecommerce development service, see our pricing or get in touch.

FAQs

What size should website images be?

There is no single answer. Aim to size images close to the largest dimensions they are displayed at, allowing for high-resolution screens, and let responsive images handle smaller devices.

Is WebP better than JPEG?

WebP often produces smaller files at similar quality and is widely supported. JPEG remains a reliable choice, and many platforms serve modern formats automatically.

Does image compression affect SEO?

Indirectly. Smaller images help pages load faster, which supports user experience and Core Web Vitals.

Should every image have alt text?

Meaningful images should. Purely decorative images can usually use an empty alt attribute so screen readers skip them.

What is lazy loading?

Lazy loading delays loading images until they are about to come into view, reducing the initial page weight. Avoid applying it to images visible as the page first loads.

Free consultation

Let’s Talk About Growing Your Business Online.

Book a free, no-obligation 30-minute discovery call with one of our senior digital strategists.