Image SEO Complete Guide: Optimise Photos for Better Google Rankings
A complete reference for image SEO — covering file names, alt text, compression for Core Web Vitals, structured data, and getting images to rank in Google Image Search.
Image SEO is often treated as an afterthought — slap an alt tag on an image and call it done. In reality, image optimisation affects two distinct and important aspects of search performance: Core Web Vitals and page load speed (which directly influence your page's ranking in standard Google Search), and Google Image Search (a separate traffic channel that sends significant organic visitors to e-commerce, recipe, design, and news sites). This guide covers both dimensions comprehensively.
Why Image SEO Matters
Consider the scale of Google Image Search: Google indexes billions of images and surfaces them for 22.6% of all Google searches (SparkToro, 2023). For visual product categories — furniture, clothing, food, travel, architecture — Image Search can account for 15–30% of a site's organic traffic. Even for content-focused sites, well-optimised images improve engagement, time on page, and shares, all of which are indirect ranking signals.
On the page speed side, images are the most common cause of poor Core Web Vitals scores. Google confirmed in 2021 that Core Web Vitals are a direct ranking factor. Unoptimised images can be the single change that moves a page from a good CWV score (green) to a poor one (red) — with a corresponding impact on rankings.
1. Image File Names
Googlebot reads image file names as a signal to understand image content. A descriptive file name provides context when the crawler has not yet fully analysed the image visually.
Format rules:
- Use hyphens to separate words:
red-leather-sofa-living-room.jpg - Include your target keyword naturally:
compress-jpeg-image-online.jpg - Keep names specific and descriptive:
how-to-compress-image-step-2-upload-button.png - Avoid:
IMG_20240312.jpg,image (3).png,photo1.jpg - Do not keyword-stuff:
compress-image-compress-jpg-compress-image-free.jpgis counterproductive.
2. Alt Text (Alt Attribute)
Alt text is the most important image SEO element. It serves three purposes: accessibility (read by screen readers for visually impaired users), understanding for Googlebot (used as a key signal for image ranking), and fallback display when images fail to load.
| Scenario | Bad Alt Text | Good Alt Text |
|---|---|---|
| Product photo | image1 | Women's blue cotton summer dress with floral pattern |
| Tutorial screenshot | screenshot | CompressImg upload area showing drag and drop interface |
| Recipe photo | food | Homemade chocolate chip cookies on a cooling rack |
| Infographic | infographic | Infographic showing 5 steps to reduce image file size for web |
| Team photo on About page | team | The CompressImg development team in their London office |
Alt text should describe what is in the image, be specific and natural, and include the target keyword when it accurately describes the image. Do not stuff keywords into every alt tag regardless of what the image actually shows.
3. Image Compression and Core Web Vitals
Image compression affects three Core Web Vitals metrics:
- Largest Contentful Paint (LCP): If your page's largest element is a hero image (common on most pages), the time it takes to load that image IS your LCP score. A 1.5 MB hero image on a 4G connection can produce an LCP of 5–8 seconds (poor). A 120 KB compressed hero loads in under 1 second (good).
- Cumulative Layout Shift (CLS): Images without explicit width and height attributes cause layout shifts when they load — the page jumps as images push other content down. Always specify image dimensions in HTML.
- First Contentful Paint (FCP): Large images in the critical rendering path delay FCP. Lazy loading below-the-fold images and preloading the hero image improves FCP.
Always specify image dimensions in HTML
width and height attributes to every <img> tag. This allows the browser to reserve the correct space before the image loads, eliminating cumulative layout shift. Example: <img src="photo.jpg" width="1200" height="630" alt="...">4. Image Sitemaps
A standard XML sitemap lists URLs, but does not specifically tell Google about the images on each page. An image sitemap (or image tags within your existing sitemap) explicitly lists the images on each page, including their URL, title, and caption. This helps Google discover and index images faster, particularly on large sites.
In WordPress, plugins like Yoast SEO and RankMath automatically include image data in sitemaps. For custom sites, Google's Image Sitemap documentation provides the XML specification.
5. Structured Data for Images
Structured data (Schema.org markup) helps Google understand the context of your images beyond what can be inferred from file names and alt text. Key schema types that benefit from image markup:
- Product pages:
Productschema withimageproperty — enables rich results and product carousels in Google Shopping. - Recipe pages:
Recipeschema withimageproperty — enables rich results in Image Search with the recipe title and rating overlay. - Article pages:
ArticleorBlogPostingschema withimage— required for Top Stories eligibility and used in Google Discover. - LocalBusiness:
LocalBusinessschema withphoto— business photos appear in local knowledge panels.
6. Choosing the Right Format for SEO
From a search performance standpoint:
| Format | SEO Benefit | Use When |
|---|---|---|
| WebP | Best: smallest files = fastest LCP | All web images where browser/platform supports it |
| JPEG | Good: universal, widely supported | Photographs for broad compatibility |
| PNG | Neutral: larger files slow LCP | Only for images requiring transparency or sharp text |
| SVG | Best for icons/logos: scalable, tiny | Icons, logos, simple illustrations |
| AVIF | Excellent: 20-50% smaller than WebP | Modern projects with AVIF support (80%+ browsers) |
7. Lazy Loading Images
Lazy loading defers the loading of below-the-fold images until the user scrolls near them. Modern browsers support native lazy loading via the loading="lazy" attribute — no JavaScript needed:
<img src="photo.jpg" loading="lazy" alt="...">Critical: do not lazy-load the LCP image. The LCP image (typically the hero image in the viewport on initial load) should have loading="eager" or no loading attribute at all. Lazy-loading the LCP image is one of the most common performance mistakes — it delays the element that determines your LCP score.
8. CDN and Image Delivery
For sites with significant traffic, serving images from a Content Delivery Network (CDN) reduces latency for visitors around the world. Images are served from a server geographically closest to the user:
- Cloudflare Images: Automatic WebP conversion and CDN delivery.
- Cloudinary: Full image processing and optimisation pipeline with CDN.
- AWS CloudFront + S3: Common setup for larger production sites.
- Next.js Image component: Built-in optimisation, WebP conversion, lazy loading, and CDN delivery from Vercel.
9. Google Image Search Ranking Factors
Google's image ranking documentation identifies these key factors for Image Search:
- The surrounding text on the page: Google uses the text near an image to understand what it shows. A product image surrounded by a detailed description ranks better than a standalone image.
- Alt text, title, and caption: Explicit descriptors that provide direct signals to Google.
- Image file name: As described above.
- Page quality: Images on high-quality, authoritative pages rank better in Image Search. The overall content quality of your page directly affects your images' rankings.
- User experience signals: Click-through rates from Image Search, time on page after click-through, and mobile-friendliness of the landing page.
- SafeSearch and content quality: Images on sites with strong E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness) signals rank better.
Image SEO Audit Checklist
Use this checklist to audit any page:
- Every image has a descriptive, keyword-relevant file name (hyphens, lowercase)
- Every image has a descriptive
altattribute - All images have explicit
widthandheightattributes - Hero/LCP image uses
loading="eager"or no loading attribute - Below-the-fold images use
loading="lazy" - Hero image is compressed under 150 KB
- All other images are under 100 KB
- Images are served in WebP or AVIF format (with JPEG fallback)
- Image sitemap entries or image tags in XML sitemap
- Appropriate Schema.org markup includes image property
- PageSpeed Insights shows no image-related opportunities
Conclusion
Image SEO is not a single technique — it is a collection of practices that collectively affect two important search channels: Core Web Vitals (and standard Google rankings) and Google Image Search. Working through this checklist systematically for your most important pages typically produces measurable improvements in both page speed scores and organic traffic within a few weeks. Start with compression and alt text — the highest-impact, lowest-effort items — and work through the rest as time allows.
Ready to compress your images?
Use our free online tool to reduce any image to an exact KB target — instantly, privately, in your browser.
Try Free Image Compressor →