Ajuved Roshan

Image optimisation for websites: faster pages without losing quality

Large images are the most common reason websites load slowly. Here's how to choose the right format, size and compression, add alt text and lazy loading, and keep images sharp.
Image optimisation for websites: faster pages without losing quality

Share

A single photo straight from a phone or camera can be several megabytes, larger than the rest of the page combined. Multiply that by a gallery or a homepage slider, and visitors on mobile data wait, and leave. Optimising images is often the quickest speed improvement you can make.

1. Choose the right format

FormatBest for
WebPMost photos and graphics; much smaller than JPEG at similar quality
AVIFEven smaller files; supported by modern browsers
JPEGPhotos, as a fallback
PNGGraphics that need transparency, screenshots with text
SVGLogos and icons; sharp at any size and tiny

2. Resize before uploading

Upload images at the size they’ll actually be shown, with some extra for high-resolution screens. A full-width hero rarely needs to be wider than about 2000 pixels; a thumbnail might need only 600. A 6000-pixel photo shrunk by the browser still downloads at full size.

3. Compress

Compression removes data you can’t see. Tools like Squoosh (free, in the browser), or WordPress plugins like ShortPixel, Imagify or EWWW can compress automatically on upload and create WebP versions. Aim for the smallest file where the image still looks good at its display size.

4. Serve the right size to each screen

Modern websites use responsive images (the srcset attribute), so phones download a smaller version than desktops. WordPress does this automatically for images inserted normally, as long as your theme supports it.

5. Lazy-load images below the fold

Lazy loading delays images until the visitor scrolls near them. WordPress adds it by default. But don’t lazy-load the main image at the top of the page. That image should load first, because it often decides your Largest Contentful Paint score.

6. Set width and height

Images without dimensions make the layout jump as they load, which hurts the Cumulative Layout Shift score and annoys readers. Make sure images have width and height set, or a fixed aspect ratio.

7. Write useful alt text

Alt text describes the image for people using screen readers and helps Google understand it. Describe what’s in the picture in a natural sentence. Skip alt text for purely decorative images.

Weak alt textBetter alt text
image1Modern villa kitchen with marble island in Dubai Hills
sofa sofa leather sofa cheapBrown leather three-seater sofa after deep cleaning

8. Use descriptive file names

Rename IMG_4821.jpg to villa-kitchen-marble-island.webp before uploading. It’s a small detail that helps image search.

Quick checklist

  • WebP or AVIF for photos, SVG for logos and icons
  • Resized to display size before upload
  • Compressed
  • Responsive sizes served
  • Lazy loading below the fold only
  • Width and height set
  • Descriptive alt text and file names

The fastest image is the one that’s exactly as big as it needs to be.

Images are one part of page speed. See Core Web Vitals fixes for WordPress, or let me handle it in my technical SEO service.

Is your website slow because of images? Message me on WhatsApp or send a project enquiry. I reply within one working day.

Ajuved Roshan, web designer and developer in Dubai, UAE

Written by

Ajuved Roshan

Freelance web designer and developer in Dubai. I design, build, host and optimise WordPress, WooCommerce and Shopify websites for clinics, e-commerce and corporate brands.

(Let's talk)

Need a website like this?

Tell me about your project on WhatsApp. I design, build, host and rank websites for brands in Dubai and the UAE, and I reply the same day.

(Keep reading)

More articles