Images affect SEO in two ways. They are often the heaviest part of a page, so unoptimised images slow everything down and hurt Core Web Vitals. And images can be a source of traffic in their own right through Google Images, Google Lens and image results in regular search, especially for products, recipes, places and design work. This guide covers both: technical optimisation for speed and descriptive optimisation for discovery.

1. Use your own images where possible

Original photos of your work, products, team and premises help visitors trust you and give search engines something unique. Stock photos appear on thousands of sites and add little. For product and local businesses, real images often convert noticeably better.

2. Choose descriptive file names

Rename files before uploading: red-cedar-deck-oakville.jpg, not IMG_4382.jpg. Use lowercase words separated by hyphens. File names are a small signal, but they help search engines understand the image and keep your media library organised.

3. Write useful alt text

Alt text describes an image for people using screen readers and for search engines. Good alt text:

  • Describes what the image shows and why it matters on the page: "Technician replacing a furnace filter in a basement utility room."
  • Is specific and concise, usually a sentence or less.
  • Includes relevant keywords only where they naturally describe the image.
  • Is empty (alt="") for purely decorative images, so screen readers skip them.

Avoid stuffing ("plumber Toronto best plumber Toronto plumbing"). It is unhelpful for accessibility and looks spammy. See accessibility in web design.

4. Use modern formats

FormatBest forNotes
WebPMost photos and graphicsMuch smaller than JPEG and PNG at similar quality; supported by all modern browsers
AVIFPhotos where file size matters mostOften even smaller than WebP; widely supported in current browsers
JPEGPhotos, as a fallbackUniversal support
PNGGraphics needing transparencyLarge for photos; prefer WebP where possible
SVGLogos, icons, simple illustrationsScales perfectly and is tiny

5. Compress and size correctly

  • Resize images to the largest size they are actually displayed at. A 4000-pixel photo shown at 800 pixels wastes bandwidth.
  • Compress with tools such as Squoosh, ShortPixel, TinyPNG or your platform's built-in optimisation.
  • For most photos, quality settings around 70–85% look identical to the original and are far smaller.

6. Serve responsive images

Use srcset and sizes so phones download smaller versions than desktops. Most modern platforms, including WordPress and Shopify, generate these automatically if you upload a large enough original.

7. Set dimensions and lazy-load wisely

  • Always include width and height attributes (or CSS aspect ratio) so the page does not jump as images load. This prevents layout shift.
  • Lazy-load images below the fold with loading="lazy".
  • Do not lazy-load the main image at the top of the page; it is often the Largest Contentful Paint element. Consider fetchpriority="high" for it instead.

See Core Web Vitals explained.

8. Place images near relevant text

Google uses the surrounding text, captions and page title to understand an image. An image of a finished kitchen next to a paragraph describing the renovation is easier to interpret than the same image in a generic gallery. Captions are read more than body text, so use them where they add information.

9. Make images crawlable

  • Use standard <img> elements for important images. Images added only as CSS backgrounds are not indexed as images.
  • Do not block image folders in robots.txt.
  • Include important images in your XML sitemap or an image sitemap on large sites.
  • Use a CDN for faster delivery, ideally serving images from your own domain or a subdomain.

10. Add structured data where relevant

Product, Recipe, Article and other structured data types include image properties. They help Google show your images in rich results and in Google Images with badges such as "Product". See schema markup.

Images and visual search

Google Lens lets people search with their camera. Clear, well-lit, original product and place photos from several angles give you a better chance of appearing in these results. See the rise of visual search.

Common mistakes

  • Uploading full-resolution camera photos directly.
  • Missing alt text, or alt text stuffed with keywords.
  • Lazy-loading the hero image.
  • Important text embedded in images, where search engines and screen readers struggle to read it.
  • Huge image sliders on the homepage.

Platform tips

  • WordPress: WordPress creates responsive image sizes and adds lazy loading automatically. An optimisation plugin such as ShortPixel, Imagify or your host's tool can compress uploads and serve WebP or AVIF. Fill in the alt text field in the media library when you upload.
  • Shopify: Shopify's CDN resizes images and serves modern formats automatically. Upload good-quality originals (around 2048 pixels wide is plenty for most themes), write alt text for each product image and avoid apps that add heavy image sliders.
  • Custom sites: use an image CDN or build step that generates resized, compressed versions in modern formats, and output srcset, dimensions and lazy loading in your templates.

Frequently asked questions

Do image file names really matter?

A little. They are a minor signal, but descriptive names cost nothing and help organisation.

Does EXIF data affect rankings?

Google has said it does not use EXIF metadata such as camera details or GPS for ranking.

How do I check which images slow my site?

Run PageSpeed Insights; it lists images that could be resized, compressed or served in modern formats.

Need a faster, more visual site?

Image optimisation is part of our technical SEO service. Start with a free SEO audit.

Written by

Priya Sharma

Digital marketing expert helping businesses grow online through SEO and strategic content.

All Articles