How to Optimize Images for SEO: The Complete Guide
Image SEO is one of the most underused levers in on-page optimisation. Most sites obsess over title tags and meta descriptions while leaving hundreds of unoptimised images sitting on every page — slowing load times, bleeding crawl budget, and missing out on Google Image Search traffic. This guide covers everything: alt text, file naming, dimensions, compression, modern formats, lazy loading, responsive images, image sitemaps, CDNs, structured data, and ecommerce-specific tactics. Follow the checklist at the end and you will have covered every major image optimisation signal that matters for SEO in 2026.
Why Image Optimization Matters for SEO
Images affect SEO in more ways than most people realise. Here is why image SEO deserves serious attention:
- Page speed: Images are usually the largest assets on a page. Unoptimised images are the single most common cause of slow page speed scores. Google uses page speed as a ranking factor, and Core Web Vitals — particularly Largest Contentful Paint (LCP) — are often dominated by a hero image.
- Google Image Search: Google Images drives a significant percentage of web searches. Properly optimised images with descriptive alt text and file names can rank in image search and bring in additional organic traffic.
- Cumulative Layout Shift (CLS): Images without explicit width and height attributes cause the page to reflow as they load, producing layout shifts that hurt Cumulative Layout Shift (CLS) scores and damage user experience.
- Accessibility: Alt text is required for screen reader users. Accessibility and SEO are aligned here — what helps users with visual impairments also helps search engines understand your content.
- Crawl efficiency: Well-structured image sitemaps and correctly named files help Googlebot discover and index your images faster.
- E-E-A-T signals: Original, high-quality images are a signal of genuine expertise and experience, factors that feed into Google's quality assessment.
In short, image optimization is not a niche technical task — it sits at the intersection of performance, accessibility, and content quality, all of which influence rankings directly or indirectly.
Consider some concrete numbers. According to HTTP Archive data, images account for around 50% of the total page weight of an average webpage. Google's PageSpeed Insights and Lighthouse audits list image-related recommendations — such as "Serve images in next-gen formats", "Properly size images", and "Efficiently encode images" — among the most common opportunities identified. For many sites, fixing images alone is enough to move from a failing Core Web Vitals score to a passing one. That is a ranking improvement available entirely without touching a single line of content or acquiring a single backlink.
1. Alt Text: The Complete Guide
Alt text (the alt attribute on an <img> tag) serves three purposes: it tells search engines what the image shows, it is read aloud by screen readers for visually impaired users, and it is displayed when the image fails to load. Getting alt text right is the most important single step in image SEO.
How to Write Good Alt Text
- Describe what is actually in the image, not what you wish were in it.
- Be specific. Mention colour, brand, model, setting, or action where relevant.
- Include your target keyword naturally if — and only if — it fits the description. Do not force it.
- Keep it concise. Aim for under 125 characters. Screen readers typically cut off after that.
- Do not start with "Image of" or "Photo of" — Google already knows it is an image.
- Do not keyword-stuff. Repeating keywords in alt text is a spam signal.
- Use
alt=""(empty alt) for purely decorative images. This tells screen readers to skip the image entirely.
10+ Alt Text Examples
| Context | Poor Alt Text | Good Alt Text |
|---|---|---|
| Running shoe product | shoe | Red Nike Air Zoom Pegasus 41 running shoe, side view |
| SEO dashboard screenshot | image | RankNibbler SEO score dashboard showing 92 out of 100 |
| Recipe photo | cake.jpg | Chocolate fudge cake with vanilla cream frosting on white plate |
| Office team photo | team | Five-person marketing team in a glass-walled conference room |
| Infographic | infographic | Infographic showing 5-step image SEO optimisation process |
| Chart or graph | chart | Bar chart comparing WebP versus JPEG file size reduction percentages |
| Blog hero image | hero | Person typing on laptop with SEO analytics on screen |
| Logo | logo | RankNibbler logo |
| Decorative border | border image | alt="" (empty — skip it) |
| Icon button | icon | Search icon or aria-label if the icon is inside a button |
| Property listing | house | Three-bedroom terraced house with red brick exterior in Manchester |
| Before/after comparison | before | Website homepage before redesign with cluttered navigation |
You can audit every image on your page for missing or thin alt text using the RankNibbler alt text checker. It flags empty alt attributes, very short alt text, and alt text that matches the file name (a common sign of auto-generated placeholder text).
2. Image File Naming
Search engines read file names as a signal when indexing images. A file called IMG_4521.jpg tells Google nothing. A file called red-nike-air-zoom-pegasus-running-shoe.jpg reinforces the image content and can help it rank in image search for relevant queries.
File Naming Best Practices
- Use hyphens (
-) to separate words, not underscores or spaces. Google treats hyphens as word separators. - Keep names all lowercase.
Running-Shoe.jpgandrunning-shoe.jpgmay behave differently on case-sensitive servers. - Be descriptive but reasonably concise. Three to six words is usually enough.
- Include your primary keyword where it naturally fits.
- Rename images before uploading, not after. Changing a live URL requires a 301 redirect and risks losing any image search rankings.
- Avoid generic names like
image1.jpg,photo.png, orscreenshot.webp.
File Naming Examples
| Bad File Name | Good File Name |
|---|---|
IMG_4521.jpg | red-nike-running-shoe-side-view.jpg |
DSC00342.png | london-bridge-at-sunset.png |
screenshot1.webp | ranknibbler-seo-score-dashboard.webp |
product_photo.jpg | oak-dining-table-180cm-walnut.jpg |
image (1).jpg | chocolate-fudge-cake-recipe.jpg |
3. Image Dimensions and Aspect Ratios
Always declare explicit width and height attributes on every <img> tag. This is one of the easiest fixes in image SEO and it has a direct impact on Core Web Vitals.
Why Dimensions Matter
When a browser starts rendering a page, it builds the layout before all images have finished loading. If the browser does not know how tall and wide an image will be, it cannot reserve space for it. When the image eventually loads, the page shifts — that is Cumulative Layout Shift (CLS). A CLS score above 0.1 is considered poor by Google and can negatively affect rankings.
Adding width and height attributes gives the browser the information it needs to reserve the exact right amount of space before the image loads, eliminating layout shift entirely.
Correct HTML Example
<img src="red-nike-running-shoe.webp" alt="Red Nike Air Zoom running shoe" width="800" height="600">
With CSS, you can still make images responsive while keeping the aspect ratio hint:
img { max-width: 100%; height: auto; }
The browser uses the declared width and height to calculate the aspect ratio and reserve space, even when CSS changes the rendered size.
Common Display Sizes and Aspect Ratios
| Use Case | Recommended Dimensions | Aspect Ratio |
|---|---|---|
| Blog hero / featured image | 1200 × 630px | 1.91:1 |
| Open Graph image (social share) | 1200 × 630px | 1.91:1 |
| Product image (square) | 800 × 800px | 1:1 |
| Product image (portrait) | 800 × 1000px | 4:5 |
| Full-width content image | 1200 × 800px | 3:2 |
| Thumbnail | 400 × 300px | 4:3 |
| Logo | 200 × 60px (or SVG) | Variable |
| Twitter Card large image | 1200 × 628px | 1.91:1 |
Use the RankNibbler image dimensions checker to audit your pages for images with missing width and height attributes.
4. Image Compression Techniques and Tools
Compression is where the biggest performance gains come from. An uncompressed 3MB hero image can become a 90KB WebP file with no visible quality difference at normal screen sizes. That is a 97% reduction in file size and a dramatic improvement in load time.
Lossy vs Lossless Compression
- Lossy compression permanently removes some image data to achieve smaller file sizes. The quality reduction is usually imperceptible at moderate compression levels. Use for photographs and complex images.
- Lossless compression reduces file size without discarding any image data. Smaller savings than lossy, but no quality loss at all. Use for screenshots, diagrams, and images with text where sharpness matters.
Target File Sizes
| Image Type | Target File Size | Notes |
|---|---|---|
| Hero / banner (WebP) | Under 150KB | Critical for LCP score |
| Product photo (WebP) | Under 100KB | Especially important on listing pages |
| Blog content image (WebP) | Under 80KB | Multiple images per page add up |
| Thumbnail (WebP) | Under 30KB | Can appear dozens of times on a page |
| Logo (SVG) | Under 10KB | SVG scales perfectly at any size |
Compression Tools
- Squoosh (squoosh.app) — Free, browser-based tool from Google. Supports WebP, AVIF, and JPEG XL. Shows before/after comparison. Excellent for manual optimisation.
- TinyPNG / TinyJPG (tinypng.com) — Drag-and-drop compression for PNG and JPEG. Good for quick batch processing.
- ImageOptim — Mac desktop app for lossless and lossy compression. Integrates well into workflows.
- Sharp — Node.js library for server-side image processing. The go-to choice for automating optimisation in build pipelines.
- Cloudflare Images / imgix / Cloudinary — Cloud-based image transformation services. Automatically serve the right format, size, and quality to each device. See the CDN section below.
- WordPress plugins — ShortPixel, Imagify, and EWWW Image Optimizer automate compression on upload and can bulk-convert existing images.
Resolution Matters Too
Uploading a 4000-pixel-wide photograph to a site where it displays at 800px wide is wasteful. The browser downloads four times more data than it needs. Always resize images to roughly the maximum rendered size before applying compression. For responsive images, see the srcset section below.
5. Modern Image Formats: WebP and AVIF
Choosing the right format is as important as compression settings. JPEG and PNG were designed in the 1990s. WebP and AVIF are modern formats engineered for the web, offering significantly better compression at the same visual quality.
Format Comparison
| Format | Best For | Typical Size Saving vs JPEG | Browser Support | Transparency |
|---|---|---|---|---|
| AVIF | Photos, all general use | 50% smaller | Chrome, Firefox, Safari 16+, Edge | Yes |
| WebP | Photos and graphics | 25–35% smaller | All modern browsers (99%+ global) | Yes |
| JPEG | Photos (fallback) | Baseline | Universal | No |
| PNG | Graphics with hard edges | Larger than JPEG for photos | Universal | Yes |
| SVG | Icons, logos, illustrations | Scales infinitely | Universal | Yes |
| GIF | Simple animations (use video instead) | Much larger than MP4 | Universal | Basic (1-bit) |
Recommended Strategy
Serve AVIF to browsers that support it, WebP as the fallback, and JPEG/PNG as the last resort. Use the HTML <picture> element to declare multiple sources:
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Descriptive alt text" width="800" height="600">
</picture>
The browser picks the first format it supports. If you use an image CDN (like Cloudflare Images or imgix), format negotiation happens automatically via the Accept HTTP header — you do not need to manage multiple files.
What About GIFs?
Avoid GIFs for animations. An animated GIF is typically 5 to 20 times larger than the equivalent MP4 video. Use a <video> element with autoplay, loop, muted, and playsinline attributes instead. It looks identical to users but loads far faster.
6. Lazy Loading Images
Lazy loading defers the loading of images that are not yet visible in the viewport. Instead of downloading every image on the page when it first loads, the browser only fetches images as the user scrolls toward them. This reduces the initial page load time and saves bandwidth for users who never scroll past the fold.
How to Implement Lazy Loading
The native browser API requires just one attribute:
<img src="below-fold-image.webp" alt="Chart showing SEO traffic growth" width="800" height="450" loading="lazy">
Browser support for loading="lazy" is now universal across modern browsers. No JavaScript library is needed.
What Not to Lazy Load
Never add loading="lazy" to images that are visible above the fold on initial page load — especially:
- Hero images and banner images
- Your site logo in the header
- The first product image on a listing page
- Any image that is part of the LCP element
Lazy loading these images will delay them and actively hurt your LCP score, which is a Core Web Vitals ranking factor. Add loading="eager" (or simply omit the attribute) for above-the-fold images. For your most critical hero image, consider adding fetchpriority="high" as well:
<img src="hero.webp" alt="Homepage hero image" width="1200" height="630" fetchpriority="high">
Use the RankNibbler lazy loading checker to audit your pages and identify images that should have loading="lazy" and any above-the-fold images that have been incorrectly lazy-loaded.
7. Responsive Images with srcset
A single image file served to all devices wastes bandwidth on mobile phones, which do not need a 1400-pixel-wide image to fill a 390-pixel screen. The srcset attribute lets you provide multiple image files at different sizes and let the browser pick the most appropriate one based on the device's screen size and pixel density.
srcset Syntax
<img
src="image-800.webp"
srcset="image-400.webp 400w, image-800.webp 800w, image-1200.webp 1200w"
sizes="(max-width: 600px) 100vw, (max-width: 900px) 80vw, 800px"
alt="Image SEO guide header"
width="800" height="450"
>
The srcset attribute declares available image files and their widths. The sizes attribute tells the browser how wide the image will be rendered at different viewport sizes. The browser then downloads the smallest file that still looks sharp on the user's screen. On a mobile device with a 390px viewport, it might download the 400w version. On a Retina display, it might choose the 800w or 1200w version.
Pixel Density Descriptors
For simpler cases like logos and icons, you can use pixel density descriptors (1x, 2x) instead of width descriptors:
<img src="logo.webp" srcset="logo.webp 1x, [email protected] 2x" alt="RankNibbler logo" width="160" height="48">
Automating Responsive Images
Generating multiple size variants of every image manually is tedious. Image CDNs and build tools handle this automatically. Next.js has a built-in Image component that generates srcset automatically. WordPress generates multiple sizes on upload. Cloudinary and imgix can resize on-the-fly based on URL parameters.
8. Image Sitemaps
An image sitemap (or image data within your main sitemap) tells Google about images on your site that it might not discover through normal crawling — particularly images loaded by JavaScript or embedded in CSS backgrounds.
How to Add Images to Your XML Sitemap
You can embed image data directly in your existing XML sitemap using the image: namespace:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/product/running-shoe</loc>
<image:image>
<image:loc>https://www.example.com/images/red-nike-running-shoe.webp</image:loc>
<image:title>Red Nike Air Zoom Pegasus Running Shoe</image:title>
<image:caption>Red Nike Air Zoom Pegasus 41 in crimson and white</image:caption>
</image:image>
</url>
</urlset>
Image Sitemap Tips
- You can include up to 1,000 images per URL in a sitemap.
- Image URLs can be on a different domain or CDN from the page URL.
- Submit your sitemap via Google Search Console and check the Coverage report to confirm images are being indexed.
- For large sites, consider a dedicated image sitemap file referenced from your sitemap index.
- The
image:titlefield should match the image's alt text or describe it accurately.
You can generate and check your overall sitemap structure from the RankNibbler site audit.
9. Image CDNs
An image CDN (Content Delivery Network) is a specialised service that stores, transforms, and delivers images from servers close to your users. Unlike a general CDN which simply caches static files, an image CDN can resize, reformat, and compress images on-the-fly based on the requesting device.
Key Benefits of Image CDNs
- Automatic format conversion: Serves WebP or AVIF to browsers that support them, and falls back to JPEG/PNG automatically — no
<picture>tags needed. - On-the-fly resizing: Generate any image size via URL parameters. No need to pre-generate multiple size variants.
- Global edge delivery: Images are served from a server close to the user, reducing latency.
- Automatic compression: Apply quality settings globally without re-processing source files.
- Lazy transformation: Upload original high-resolution files and let the CDN handle all derivative versions.
Popular Image CDN Options
| Service | Notes | Free Tier |
|---|---|---|
| Cloudflare Images | $5/month flat rate, tight Cloudflare integration | No (paid only) |
| Cloudinary | Full-featured, generous free tier, widely used | Yes (25GB) |
| imgix | Powerful URL-based transforms, used by large sites | Trial only |
| Bunny.net Optimizer | Affordable, good WebP/AVIF support | Yes (limited) |
| Next.js Image Optimization | Built-in, handles srcset and format automatically | Yes (self-hosted) |
For most sites, the combination of Cloudflare CDN (for caching) plus Squoosh or Sharp for pre-processing is sufficient. Image CDNs become worth it once you have thousands of images or complex multi-device requirements.
10. Image Structured Data
Structured data (JSON-LD schema markup) can make your images eligible for rich results in Google Search. Adding ImageObject schema or embedding image data within Article, Product, or Recipe schema can result in your images appearing prominently in search results with additional context.
ImageObject Schema
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ImageObject",
"url": "https://www.example.com/images/red-nike-running-shoe.webp",
"width": 800,
"height": 600,
"name": "Red Nike Air Zoom Pegasus Running Shoe",
"description": "Red Nike Air Zoom Pegasus 41 running shoe, side view on white background",
"contentUrl": "https://www.example.com/images/red-nike-running-shoe.webp"
}
</script>
Images Within Other Schema Types
- Article: Include an
imageproperty pointing to the featured image. Google recommends images at least 1200px wide with a minimum aspect ratio of 4:3 for rich results eligibility. - Product: Include
imagein your Product schema to populate product images in Shopping results and product knowledge panels. - Recipe: Recipe schema with an
imageproperty can result in your recipe photos appearing in the visual recipe carousel. - FAQPage / HowTo: Include images in HowTo steps to make each step visually scannable in rich results.
Google requires images in structured data to be crawlable and indexable (not blocked by robots.txt or requiring authentication). The image URL in your schema should match the actual URL used in your HTML.
11. Ecommerce Image SEO
Ecommerce sites have unique image SEO challenges. A typical product catalogue might contain tens of thousands of images, often auto-generated by a CMS with generic file names and missing or templated alt text. Getting image SEO right at scale requires a systematic approach.
Product Image Best Practices
- Multiple views: Provide front, side, back, and detail shots. Google can index all of them, and users convert better with more visual information.
- Alt text at scale: Use a template that pulls in product attributes:
[Brand] [Model] [Colour] [Category] [View]. Example:Nike Air Max 90 Black Trainers Front View. This is far better than a blank alt or just the SKU code. - Consistent file naming: Build a naming convention into your CMS. For example:
[brand]-[product-slug]-[view]-[colour].webp. - White background for product shots: Google Shopping prefers clean white background product images for Shopping ads and free product listings.
- Zoom-quality images: Upload high-resolution source images (1000px+ on the shortest side). Users zoom in, and Google can use high-resolution images in its product knowledge panels.
- Compress aggressively: With hundreds of product images per page on category pages, file size has a massive cumulative effect. Target under 60KB per product thumbnail in WebP.
- Product schema with images: Add Product schema to every product page with the
imageproperty populated. This feeds Google's Shopping results directly. - User-generated content (UGC) images: If you display customer review photos, ensure they have appropriate alt text too. UGC images can rank in image search and drive additional traffic.
Category Page Image Optimisation
Category pages often load 20, 40, or even 100 product thumbnail images. Each one is a potential image search result and each one contributes to page load time. Use lazy loading on all product thumbnails except the first two rows, and compress thumbnails to the smallest reasonable file size. A 300×300 WebP thumbnail should be under 30KB in most cases.
Image SEO for Google Shopping
Google Shopping (both paid and free product listings) uses the product images you provide in your Google Merchant Center feed. The feed pulls images from your Product schema or your data feed file. Requirements for Shopping images are stricter than for organic image search: no watermarks, no promotional overlays, no placeholders, and white or light grey backgrounds are strongly preferred for apparel and hard goods. Images must be at least 100×100px (250×250px for clothing) and no larger than 64MB. Larger images with more detail perform better in Shopping results because Google can display them at higher resolution in the product panel. Aim for 800×800px or larger as your primary product image.
Handling Image Variants
Many ecommerce products come in multiple colours or configurations. The SEO-friendly approach is to provide a distinct image for each variant and update the displayed image via JavaScript when the user selects a colour, without changing the page URL. Ensure the canonical product page shows at least one high-quality image in its HTML (not rendered exclusively via JavaScript after user interaction), so Googlebot can index it without needing to interact with the page. For products with many variants, an image sitemap that lists all variant image URLs under the canonical product URL helps ensure full image indexation.
12. Common Image SEO Mistakes
Even experienced SEOs make these mistakes consistently. Run a full site audit to catch them systematically.
Mistakes That Hurt Page Speed
- Uploading raw camera images: A modern smartphone JPEG straight from the camera is often 4–8MB. This single image can make a page take 10+ seconds to load on a slow connection.
- Wrong format for the use case: Using JPEG for an image with a transparent background (the transparency is lost, replaced with white or a colour fringe).
- Not using WebP: Sticking with JPEG and PNG when WebP support is now effectively universal.
- Missing srcset: Serving desktop-sized images to mobile devices wastes mobile bandwidth and hurts mobile page speed scores.
- Lazy-loading the hero image: This is one of the most common causes of a poor LCP score.
- CSS background images for important content: CSS background images cannot carry alt text and are harder for search engines to index.
Mistakes That Hurt SEO Signals
- Empty alt text on content images: Leaving
alt=""on meaningful content images throws away a keyword signal and fails accessibility requirements. - Keyword-stuffed alt text: Writing
alt="SEO image optimisation image SEO optimise images SEO"is a spam signal. Google ignores it and it may harm rankings. - Generic file names: Every image file named
image1.jpg,photo.jpg, oruntitled.pngis a missed keyword opportunity. - Blocking images in robots.txt: Any image blocked from crawling cannot be indexed. Check
Disallow: /images/in your robots.txt. - Serving images over HTTP on an HTTPS site: Mixed content warnings prevent images from loading and signal a security issue.
- Missing width and height attributes: Causes CLS, which is a measured ranking factor via Core Web Vitals.
Mistakes That Hurt User Experience
- Images too small to read text in: If an image contains important text, that text needs to be readable at the rendered size.
- Images without contextual surrounding text: An image floating with no caption or surrounding descriptive text gives Google no context to understand what the image means in relation to the page topic.
- Broken images: 404 images with no alt text are invisible to everyone — sighted users, screen reader users, and search engines. Check for broken images regularly using the site audit tool.
Testing and Measuring Image SEO Performance
Optimising images is not a one-time task. Images are added continuously through blog posts, product uploads, and CMS content, and each new image is an opportunity to get it right or wrong. Build testing into your publishing workflow.
- Google Search Console: The Coverage report shows indexed images. The Core Web Vitals report shows LCP and CLS issues that are often image-related. The Performance report shows impressions and clicks from Google Images when you filter by Search type: Image.
- Google PageSpeed Insights: Run your pages through PageSpeed Insights (pagespeed.web.dev) after publishing. It flags oversized images, missing next-gen formats, and lazy loading issues with specific recommendations and estimated savings.
- Chrome DevTools: Open the Network tab, filter by Img, and reload the page. This shows every image request, its file size, and how long it took to load. The Lighthouse audit panel inside DevTools gives the same image recommendations as PageSpeed Insights.
- RankNibbler: Run any URL through the homepage checker or the site audit to get an instant report on alt text coverage, lazy loading usage, missing dimensions, and overall page speed signals. The alt text checker, lazy loading checker, and dimensions checker give targeted reports for those specific signals.
Set a reminder to re-audit your highest-traffic pages every quarter. As your CMS adds images and plugins change how assets are served, image SEO can regress even without any deliberate changes.
Image SEO Checklist
Use this checklist for every page you publish or audit. You can also run the RankNibbler homepage checker or the full site audit to automate many of these checks.
| # | Check | Tool |
|---|---|---|
| 1 | Every content image has descriptive alt text (not empty, not keyword-stuffed) | Alt Text Checker |
| 2 | Decorative images use alt="" | Manual review |
| 3 | All image file names are descriptive (hyphens, lowercase, no generic names) | Manual review |
| 4 | Every <img> tag has explicit width and height attributes | Dimensions Checker |
| 5 | Below-fold images have loading="lazy" | Lazy Loading Checker |
| 6 | Hero / above-fold images do NOT have loading="lazy" | Lazy Loading Checker |
| 7 | Critical hero image has fetchpriority="high" | Manual review |
| 8 | Images are compressed to target file sizes | Squoosh / TinyPNG |
| 9 | Images are served in WebP (or AVIF) format | RankNibbler Audit |
| 10 | <picture> tags or CDN provide JPEG/PNG fallbacks for older browsers | Manual review |
| 11 | srcset and sizes attributes used for responsive images | Manual review |
| 12 | Images are included in XML sitemap with title and caption | Google Search Console |
| 13 | Images are NOT blocked in robots.txt | Site Audit |
| 14 | Images are served over HTTPS (no mixed content) | Site Audit |
| 15 | Product pages include Product schema with image property | Manual review |
| 16 | No broken image URLs returning 404 | Site Audit |
| 17 | CLS score is 0.1 or below (images not causing layout shift) | CLS Guide |
| 18 | Page load time is acceptable (images not a major bottleneck) | Page Speed Guide |
Frequently Asked Questions About Image SEO
Does alt text directly affect Google rankings?
Yes, indirectly and directly. Alt text is one of the primary signals Google uses to understand what an image shows and therefore what topic a page covers. It directly influences image search rankings. It also feeds into the overall topical relevance signals for the page. Missing alt text on key images means leaving ranking signals on the table.
How important is image file name for SEO?
It is a moderate signal. Google confirms that it uses file names as one of many signals to understand image content. It is not as strong as alt text, but it takes seconds to do correctly and there is no reason to skip it. Rename images before uploading — changing a live URL later requires a redirect and can affect any image search traffic the URL has accumulated.
Should I use WebP or AVIF?
Use both, with AVIF as the preferred format and WebP as the fallback. AVIF offers better compression (typically 20-30% smaller than WebP at the same quality), but WebP has wider browser support. Use a <picture> element to serve AVIF first, WebP second, and JPEG/PNG as the final fallback. If you use an image CDN, it handles this automatically.
Does image file size affect rankings?
Not directly, but it affects page speed, which does. Google's page speed signals — particularly Core Web Vitals like LCP — are direct ranking factors. Large image files that slow down LCP will hurt rankings. So while Google does not look at a 500KB image and penalise it, the knock-on effect on page speed and user experience does affect your position.
What is the best image size for SEO?
There is no single best size — it depends on how the image is used. The key principle is to match the upload resolution to the maximum rendered size. A blog content image displayed at 800px wide should be uploaded at 800–1200px wide (to cover 2x Retina screens), compressed in WebP to under 100KB. See the dimensions table above for common use cases.
How do I get my images to appear in Google Image Search?
Ensure images have descriptive alt text, descriptive file names, and are not blocked by robots.txt. Add image data to your XML sitemap and submit it via Google Search Console. Use high-quality, original images (stock photos shared across thousands of sites are less likely to rank). Surround images with relevant text that provides context. Check indexing status in Google Search Console under the Coverage report.
Should I lazy load all images?
No. Only lazy load images that are not visible in the viewport on initial page load (below the fold). Never lazy load your hero image, logo, or any other image in the first viewport. Incorrectly lazy-loading above-fold images is one of the most common causes of a poor LCP score. Use the lazy loading checker to audit your pages.
What does fetchpriority="high" do?
The fetchpriority attribute hints to the browser that a specific resource should be downloaded with high priority. Adding fetchpriority="high" to your hero or LCP image tells the browser to start downloading it as soon as possible, before it has fully parsed the rest of the page. This can meaningfully improve LCP scores on pages with a large above-fold image.
Do image CDNs help SEO?
Yes, indirectly. Image CDNs improve page speed by serving optimally sized and formatted images from edge locations close to users. Faster pages score better on Core Web Vitals, which are ranking factors. They also eliminate the need to manually maintain multiple image format variants. For sites with large image libraries, an image CDN is often the most practical way to implement image optimisation at scale.
How do I check if my images are indexed by Google?
Use Google Search Console. Go to Coverage and filter by image type, or use the URL Inspection tool on specific image URLs. You can also search Google Images for your site using site:yourdomain.com within Google Images search. If you have a large site, the image sitemap report in Search Console will show how many image URLs have been submitted and indexed.
Does Google care about image format?
Google can index all common image formats including JPEG, PNG, WebP, AVIF, SVG, and GIF. It does not penalise you for using JPEG over WebP. However, the format choice affects file size, which affects page speed, which affects rankings. Use modern formats like WebP and AVIF to keep file sizes small and page speed scores high.
What alt text should I use for buttons and icons?
If the icon or button has a visible text label alongside it, the image should use alt="" (empty) to avoid reading it out twice to screen reader users. If the icon IS the only label for a button (for example, a magnifying glass icon with no text label), use descriptive alt text like alt="Search". Alternatively, use aria-label on the button element itself and mark the image as decorative with alt="".
Last updated: April 2026