Skip to content

Knowledge Centre

How to Optimise Images for SEO

  • More than 300 five‑star Google reviews
  • Rolling monthly contracts
  • Monthly SEO report
  • One client per niche in each area

Key points

  • Start with a relevant page, useful alt text and a short, descriptive file name, as Google's image guidance asks.
  • Choose a supported format, size each image to fit the page and compress it until it still looks right.
  • Never lazy load the main image at the top of the page.
  • A CDN is fine for Google when your image URLs stay consistent.
In this article13 sectionsHideShow

To optimise images for SEO, give each image a short, descriptive file name and useful alt text, place it near the text it illustrates, use a supported format at a sensible size, and make sure it does not slow the page down. Google's own image guidance covers each of these steps.

This guide puts the steps in the order we would work through them on a WordPress site. It also shows where Google, web.dev and the W3C agree, so you can check every claim at the source.

Which image fixes should you make first?

Start with the fixes that cost nothing and that Google names directly, then move on to speed. Google's Image SEO best practices page (updated 2 March 2026) gives no fixed file size target, so the order below also leans on web.dev and the W3C.

Order Fix Why it comes here Where it comes from
One Put the image on a relevant page, next to relevant text Google learns what an image is about from the page around it Google image best practices
Two Write useful alt text It helps screen reader users and gives Google a clear description W3C alt decision tree and Google
Three Rename generic files It takes minutes and avoids names like image1.jpg Google image best practices
Four Resize and compress Images are often the largest part of page size Google and HTTP Archive Web Almanac
Five Check the top image is not lazy loaded It can delay the largest visible element web.dev
Six Add an image sitemap if images are hard to find It tells Google about images it might not otherwise find Google image sitemaps

Work down the table one page at a time, starting with the page you most want to bring in enquiries.

Describe what the image shows in a way that suits the page it sits on. Google calls alt text "the most important attribute when it comes to providing more metadata for an image" and says to focus on "useful, information-rich content that uses keywords appropriately". It also says to avoid filling alt attributes with keywords.

Google's own example shows the idea. An image with alt text of "puppy" is better than one with none, and "Dalmatian puppy playing fetch" is the best of its examples. A long string of dog-related keywords is the example of what to avoid.

The W3C's alt decision tree (last updated 13 May 2024) helps you decide what each image needs:

  • Purely decorative image: use an empty alt attribute, written as alt="".
  • Photo or simple graphic that adds meaning: write a brief description that conveys that meaning.
  • Image used as a link or button: describe where it goes or what it does.
  • Image of text: include that text in the alt text if it is not on the page anywhere else.
  • Chart or complex graphic: put the information in the page text.

The GOV.UK Accessibility in government blog (17 July 2024) says to "just describe the image, taking into consideration the surrounding context". It also says not to use alt text to improve SEO. Google and the government advice fit together, because Google also says alt text helps people who cannot see images, so writing for a person using a screen reader gives Google the clear description it asks for.

In WordPress, add alt text in the Alternative Text field in the media library or in the image block settings.

What should you call image files for SEO?

Use short names that describe the picture. Google says to use file names that are "short, but descriptive" and to avoid generic names such as image1.jpg, pic.gif or 1.jpg when possible. It also suggests that the file extension matches the file type.

A name like IMG_4021.jpg becomes combi-boiler-fitting-kitchen.jpg. Google's own example, my-new-black-kitten.jpg, uses lower case words joined by hyphens, which are easy to read.

Rename the file before you upload it. Google also asks you to "consistently reference the image with the same URL" so it can cache and reuse the image, and renaming later changes that address.

Do captions and image titles matter for SEO?

They can help, because the text around an image tells Google what it is about. The Google image page says it "extracts information about the subject matter of the image from the content of the page", including captions and image titles. It asks you to place images near relevant text, on pages that match the image subject.

So write a caption where it helps the reader and put each image beside the paragraph it supports. Clear headings around the image help too, and our guide to using H1 to H3 headings shows how to set them out.

Google's page sets no rules for the HTML title attribute, and it does not mention EXIF data at all. Both can wait until the basics are done.

How much should you compress images for SEO?

Compress until the image still looks right on a normal screen, then test the page speed. Google's image guidance and the web.dev format guide set no target file size. The web.dev image format guide (last updated 13 August 2024) tells you to "try several JPEG quality levels to find the best quality versus file size tradeoff for your asset".

The effort is worth it. Google says images are often the largest contributor to overall page size. The 2025 HTTP Archive Web Almanac, which analyses a July 2025 crawl of millions of websites, found the median mobile home page used 911 KB of images and the median mobile inner page used 354 KB. Use those as a rough yardstick, and check your own figure in a speed test.

A useful test is the Largest Contentful Paint (LCP), which is the time the biggest visible element takes to appear. web.dev (updated 4 September 2025) says a good LCP is 2.5 seconds or less, measured at the 75th percentile of page loads. Google's Core Web Vitals page (updated 10 December 2025) says it highly recommends good Core Web Vitals for success with Search.

Once your LCP passes on mobile, you can stop compressing, because heavier compression can make photos look worse. For setup help on WordPress, see our guides to LiteSpeed Cache image settings for Divi and speeding up a WordPress website.

Free call

Want more enquiries from Google?

Book a free call and we'll look at your site with you, then show you what's holding it back.

What is the best image format for SEO?

For most photos, use WebP or AVIF where you can, with a JPEG or PNG fallback. Google lists the formats it supports and does not say any one of them ranks better, so the choice comes down to file size and quality. The web.dev guide to choosing the right image format (last updated 13 August 2024) says WebP and AVIF "will generally provide better compression than older formats, and should be used where possible".

Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. The table pairs that list with web.dev's advice.

Format Best use What web.dev says
JPEG Photos and screenshots Uses lossy and lossless steps to cut file size. No transparency or animation.
PNG Images that need transparency Gives the highest quality, but with a much larger file than other formats.
WebP Photos and graphics Supports transparency and animation. Better compression than older formats.
AVIF Photos Better compression than older formats. Use where possible.
SVG Logos, icons and simple shapes Suited to less complex geometric shapes such as logos, text or icons.
GIF Avoid for animation Limited to 256 colours and much larger than video. Use a video element instead.

Google also says to give every image a fallback URL in the src attribute, which is what the JPEG or PNG is for.

What is the best image size for SEO, and do responsive images matter?

There is no single best size. Make each file about as wide as it appears on the page, and offer larger copies for high resolution screens. The web.dev guide to serving images with correct dimensions was last updated on 5 November 2018, so it is old, but its point still holds. The ideal size depends on the device, and the trade-off is between quality on high-resolution devices and performance.

Responsive images solve that trade-off. Google says the srcset attribute "allows specifying different versions of the same image, specifically for different screen sizes", and the picture element groups different source versions. Your WordPress theme may already output srcset, so view the page source and search for it before you add anything.

Two more checks are worth a minute:

  • web.dev recommends adding width and height attributes to all image tags, so the browser can reserve space and avoid layout shifts.
  • Google's mobile-first indexing guidance (updated 10 December 2025) asks for high quality images and the same alt text on the mobile page as on desktop.

If you place several pictures in a row, see our guide to putting images side by side in Divi, then check the file sizes still fit the layout.

Should you lazy load images?

Lazy load images below the fold and load the main image at the top of the page straight away. web.dev says "Never lazy-load your LCP image, as that will always lead to unnecessary resource load delay" in its guide to optimising LCP (updated 31 March 2025).

web.dev's lazy loading guide (updated 13 August 2024) adds the rule of thumb: use loading="lazy" only for images outside the initial viewport. The optimisation guide also says to set fetchpriority="high" on an image you think is likely to be the page's LCP element.

Google Search needs to see lazy loaded images too. Its lazy loading page (updated 10 December 2025) asks you to make sure all relevant content loads whenever it is visible in the viewport. The mobile-first page adds a warning not to lazy load primary content that only appears after a visitor interacts with the page.

To check your own page, open the page source and look for loading="lazy" on the first large image. If a theme or plugin has added it there, switch that setting off for the top image.

Does serving images from a CDN hurt SEO?

No, Google's image guidance allows it. The page says image sitemaps can include URLs from other domains, which "lets you use CDNs (content delivery networks) to host images". It also encourages you to verify ownership of the CDN's domain name in Search Console.

A CDN can speed things up too. web.dev's LCP guide says the best way to cut the distance a file has to travel to your visitor is to use a CDN.

Keep the image URLs steady. Google asks you to reference an image with the same URL each time, and its mobile-first page warns against image URLs that change every time the page loads. Some CDN plugins rewrite addresses, so view the image address on two page loads and confirm they match.

A CDN changes your image URLs and cache rules, so it sits within Technical SEO.

Do you need an image sitemap?

Add one if Google might struggle to find your images. Google's image sitemaps page (updated 10 December 2025) says they tell Google about images on your site, especially those it might not otherwise find. It does not say you must have one.

You can make a separate image sitemap or add image tags to your existing sitemap, and Google says either approach is equally fine. These are the key details:

  • The tags you need are image:image and image:loc, which holds the image URL.
  • Google says it removed image:caption, image:geo_location, image:title and image:license from its documentation.
  • Each page entry can hold up to 1,000 image tags.
  • Image URLs can sit on another domain, such as a CDN, when you verify both domains in Search Console.

Your WordPress SEO plugin may already add images to your sitemap, so open yours and search for image:loc before you build anything.

How do you optimise images with local keywords?

Use a place name only when the photo really shows that place, and put it where a person would expect to read it. Google's image page asks for alt text that uses keywords "appropriately" and warns against keyword filling. It gives no separate rule for local keywords, so the same advice applies.

Here is a worked example. It is made up for illustration and is not a real client. A plumber in Watford photographs a new boiler going into a customer's kitchen for their boiler installation page. Suppose the job really was in Watford. The image details could look like this:

  • File name: boiler-installation-watford-kitchen.jpg
  • Alt text: Engineer fitting a wall-mounted boiler in a kitchen in Watford
  • Caption: A new boiler fitted in a Watford kitchen
  • Placement: beside the paragraph that explains how an installation day works

A stock photo of a boiler would get none of the place names, because it does not show Watford. Our guide to finding long tail keywords for local searches helps you choose the wording for the text around your images.

What is a quick image checklist for a WordPress page?

Run through these steps each time you add an image, and review older pages one at a time.

  1. Choose a page where the image fits, and place it beside the text it supports.
  2. Rename the file with a short, descriptive name before uploading.
  3. Resize it to about the width it will show, with a larger copy for sharp screens if you can.
  4. Save it as WebP, AVIF or JPEG for photos, and SVG for logos and icons.
  5. Compress it until it still looks right, then stop.
  6. Upload it and fill in the Alternative Text field using the W3C questions. Leave it empty if the image is purely decorative.
  7. Add a caption if it helps the reader.
  8. Check the top image is not lazy loaded and that width and height are set.
  9. Test the page in PageSpeed Insights and look for an LCP of 2.5 seconds or less on mobile.
  10. Open your sitemap and look for image:loc if you rely on an image sitemap.

Quick answers on image fixes for SEO

How do I optimise images for visual search?

Use sharp photos in a supported format, with a short descriptive file name and honest alt text. Place each image next to relevant text on a relevant page. Google's image guidance says high-quality photos appeal to users more than blurry, unclear images, and it reads the page around the image to understand it.

Is WebP or JPEG better for SEO?

Google Search supports both and does not say either ranks better. web.dev says WebP and AVIF generally compress better than older formats, so files are usually smaller and the page can load faster. Keep a JPEG or PNG as the fallback in the src attribute so every browser shows the image.

Should I put my keyword in every image's alt text?

No. Describe the image for the person who cannot see it, and use a keyword only when it fits that description naturally. Google says to focus on useful, information-rich alt text that uses keywords appropriately and to avoid filling it with them. A decorative image should have an empty alt attribute.

How many KB should an image be for SEO?

Google's image guidance and the web.dev format guide set no file size target. The 2025 Web Almanac found the median mobile home page used 911 KB of images in total. Compress each file until it still looks right, then test whether your page reaches an LCP of 2.5 seconds or less.

Does it matter if my images are lazy loaded?

It matters for the main image at the top of the page. web.dev says never to lazy load your LCP image because it adds avoidable delay. Lazy loading images further down the page is fine, as long as they load when they come into view so Google Search can see them.

Sources used in this article

  1. Image SEO Best Practices, Google Search Central
  2. An alt Decision Tree, W3C Web Accessibility Initiative
  3. The 2025 Web Almanac: Page Weight, HTTP Archive
Show 7 more sources
  1. Optimize Largest Contentful Paint, web.dev
  2. Image Sitemaps, Google Search Central
  3. Alternative text in action, GOV.UK Accessibility in government blog
  4. Choose the right image format, web.dev
  5. Largest Contentful Paint (LCP), web.dev
  6. Understanding Core Web Vitals and Google search results, Google Search Central
  7. Serve images with correct dimensions, web.dev
Wooden jetty leading to a small blue boathouse on calm open water under a clear sky
Paul, SEO expert and founder of First Place SEO

About the Author: Paul

SEO expert and founder, First Place SEO

Paul is the founder of First Place SEO, an SEO agency in London that helps businesses across London, Hertfordshire, Essex and the rest of the UK get found on Google and in AI search. He started the business in January 2024 and looks after every client account himself. He reads the same Search Console and Semrush data as his clients and joins their monthly reviews. More about Paul

Specialises inSEOLocal SEOAI search optimisationWeb designGoogle Ads (PPC)

Speak to Paul

Want a second opinion on your SEO?

Book a free call and Paul will tell you what he'd fix first on your site.