Guide
Image Optimization for SEO: The Complete Guide
Image SEO, or image optimization for search, means giving every image a short descriptive file name, accurate alt text, a modern format and a file sized for its slot, so Google can find it, understand it and load it fast. The 15 practices below cover Core Web Vitals, Google Lens, WordPress and a quarterly audit.
- Resize each image to its display size and compress it
- Serve photos as WebP or AVIF with a JPEG fallback
- Write a short file name and alt text that describes the image
- Set width and height, lazy-load below the fold and prioritize the main image
- Use img elements, add an image sitemap and audit quarterly
Image optimization for SEO means preparing every image so Google can find it, understand it and load it quickly: a descriptive file name, accurate alt text, a modern format such as WebP or AVIF, a file sized for the slot it fills, and a real <img> element instead of a CSS background. Done well, it opens up Google Images, Google Lens and Discover as traffic sources and protects your Core Web Vitals.
In order of impact, the work looks like this:
- Resize each image to the size it is displayed at, then compress it.
- Serve photos as WebP or AVIF, with a JPEG fallback where needed.
- Give every image a short descriptive file name and alt text that describes what it shows.
- Set width and height on every image and use
srcsetfor responsive sizes. - Lazy-load images below the fold, never the main above-the-fold image, and give that one
fetchpriority="high". - Use
<img>elements, add an image sitemap where images are loaded by script, and audit quarterly.

Most SEO guides focus on text: keywords, headings, internal links and meta descriptions. Images are often treated as decoration, although they can bring traffic on their own. A well-optimized image can rank in Google Images, appear in an image result inside the main search results, load fast enough to protect Core Web Vitals, and surface in Google Lens for visual queries that involve no typed text at all.
This guide covers each technique with the markup to implement it, plus a checklist to run on every new page and a site-wide audit to repeat quarterly.
Why Image SEO Matters for Rankings and Performance
Images affect search visibility through Google Images, Lens and Discover, and they affect load speed, which feeds Core Web Vitals.
Images as an Organic Traffic Channel
Google Images is a dedicated search surface that many sites underinvest in. Beyond image search, images appear in a range of other places:
- Image packs embedded in regular search results
- Knowledge panels with brand or product images
- Google Shopping and product carousels
- Google Lens results triggered by visual queries
- Discover feed image cards
Each of these placements is a separate traffic source. A single optimized image on a well-optimized page can pull traffic through multiple channels simultaneously.
Google says Lens is used for nearly 20 billion visual searches every month. Users photograph products, landmarks, plants and text, then ask Google to identify them. Appearing in Lens results is a growing opportunity for ecommerce, travel, food and home decor content.
The Core Web Vitals Connection
Images are the Largest Contentful Paint (LCP) element on most pages. LCP measures how long it takes for the largest visible element to render. Google highly recommends good Core Web Vitals, and its documentation says they align with what its core ranking systems seek to reward.

- Good LCP: 2.5 seconds or less, measured at the 75th percentile of page loads
- Needs improvement: 2.5 to 4.0 seconds
- Poor: over 4.0 seconds
When your hero image or another above-the-fold image is unoptimized, it delays LCP and can push the page into the "needs improvement" or "poor" range. Switching to WebP, adding a preload hint or resizing to the display dimensions can each shorten it.
Images also affect Cumulative Layout Shift (CLS), which measures visual stability. When images load without specified dimensions, the browser doesn't know how much space to reserve. As the image loads, the layout shifts and pushes text and buttons out of position. Good CLS is under 0.1. Specifying width and height attributes for every image prevents layout shifts and improves CLS automatically.
Accessibility and UX Benefits
Alt text is required for accessibility under WCAG guidelines published by the W3C Web Accessibility Initiative. Screen readers read alt text aloud to describe images to visually impaired users. It also helps your images rank: Google says it uses alt text "along with computer vision algorithms and the contents of the page to understand the subject matter of the image."
Accessibility and SEO alignment isn't accidental. Describing what an image actually shows, not keyword stuffing, is what both screen readers and Google need.
From a UX perspective, fast-loading images make pages feel quicker, especially on slower mobile connections, and Core Web Vitals measure exactly that loading and layout-stability experience.
Captions also play a UX role. A descriptive caption that adds context, rather than repeating the article title, helps visitors who scan the page. It also gives Google more text next to the image, because Google reads captions and surrounding text to understand what an image shows.
Image Formats for SEO: JPEG, PNG, WebP, AVIF, and SVG Compared
Choosing the wrong image format wastes bandwidth, slows page load, and costs ranking. The right format depends on the image type and what you need to balance between quality and file size.

| Format | Best For | File Size vs JPEG | Browser Support | Google Index |
|---|---|---|---|---|
| JPEG | Photos, complex images | Baseline | Universal | Yes |
| PNG | Screenshots, transparency | 20-30% larger | Universal | Yes |
| WebP | Photos, illustrations | 25-35% smaller | 97%+ | Yes |
| AVIF | Photos, illustrations | Up to 50% smaller | Current Chrome, Firefox, Safari, Edge | Yes |
| SVG | Icons, logos, simple graphics | Variable | Universal | Yes |
| GIF | Animated images only | Often very large | Universal | Yes |
Important: Google doesn't index CSS images. Google's image SEO documentation says to embed images with standard HTML image elements: Google finds images in the src attribute of an <img> element, including one inside a <picture> element. Never use CSS background images for content images you want indexed.
JPEG
JPEG is the baseline format for photographs and complex images. It uses lossy compression, which means some image data is discarded to reduce file size. A quality setting of 75-85 is the standard target: below that, visible compression artifacts appear; above that, file sizes increase significantly with little visible benefit.
JPEG is universally supported and the safe default when you're not using modern formats. Its main limitation is the lack of transparency support. Use PNG or WebP for images that need transparent backgrounds.
PNG
PNG uses lossless compression, preserving every pixel exactly. This makes it ideal for screenshots, UI mockups, logos with sharp edges, and images with transparency. The trade-off is larger file sizes: PNG files are typically 20-30% larger than JPEG equivalents for the same photographic content.
Use PNG for images where quality can't be compromised, particularly screenshots and images with text overlaid. For photographs, switch to WebP or JPEG instead.
WebP
WebP is the recommended default for most web images. Developed by Google, it delivers 25-35% smaller file sizes than JPEG at comparable visual quality for photographs, and even better compression for graphics. It supports both lossy and lossless compression, and handles transparency.
Browser support for WebP is now above 97% according to caniuse. For the small share of browsers without native support, use the picture element with a WebP source and a JPEG fallback:
<picture>
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Descriptive alt text here" width="800" height="600">
</picture>
AVIF
AVIF is the next-generation image format built on the AV1 video codec. It achieves up to 50% smaller file sizes than JPEG at comparable quality, outperforming even WebP in most cases. Google officially supports AVIF in Google Search alongside JPEG, PNG, WebP, SVG, BMP, and GIF.
Current versions of Chrome, Firefox, Safari and Edge all support AVIF. For maximum compatibility, serve AVIF with a WebP and JPEG fallback using the picture element.
AVIF is the best choice for new sites and high-traffic pages where image load performance is critical. For sites with mixed browser audiences, use AVIF with WebP fallback.
SVG
SVG (Scalable Vector Graphics) is the best choice for logos, icons, and simple illustrations. SVG files contain mathematical descriptions of shapes rather than pixel data, so they scale to any size without quality loss. They're often dramatically smaller than raster versions of the same graphic.
For complex illustrations with many paths, SVG files can become large. Use raster formats (WebP or PNG) for complex illustrations with gradients and photographic detail.
How to Optimize Images for SEO: 15 Best Practices
Optimizing images for SEO involves a set of technical and content decisions that work together. Apply all 15 consistently.
1. Use Short, Descriptive File Names
File names are a light signal. Google's image SEO documentation says the file name "can give Google very light clues about the subject matter of the image," so a short descriptive name helps but never replaces alt text and surrounding content. Rename every image before uploading, and use hyphens to separate words, not underscores or spaces.
Good file names:
- blue-running-shoes-nike-air-max.jpg (describes what's in the photo)
- screenshot-google-search-console-page-indexing-report.png (describes the screenshot)
- how-to-optimize-images-for-seo-checklist.webp (describes the infographic)
Poor file names:
- IMG_4893.jpg (camera default name: tells Google nothing)
- photo1.jpg or image.jpg (generic, zero signal value)
- bluerunningshoesnike.jpg (no hyphens between words)
Include the primary keyword where it's naturally accurate, but don't stuff multiple keywords into the file name. If you've multiple images on the same page, give each one its own descriptive name.
For localized pages, Google recommends translating file names to match the page language. An English page about blue running shoes and a German page about the same product should use different, language-appropriate file names. This helps Google serve the right image for the right locale.
One practical workflow: rename images before uploading them to your CMS. WordPress, for example, sets the URL from the file name at upload time. Renaming after upload requires permalink changes and can break existing references.
2. Write Effective Alt Text
Alt text (the alt attribute on an img element) is the single most important SEO signal for individual images. Google uses alt text along with computer vision algorithms and the surrounding page context to understand what an image depicts and which search queries it should match.
The W3C Web Accessibility Initiative (W3.org) provides the clearest guidance on writing effective alt text: describe the image as you would to someone who can't see it. The key is to describe the actual content, not the desired keyword.
Alt text best practices:
- Be descriptive: describe what the image actually shows
- Keep it concise: about 125 characters or fewer is a common guideline, and anything longer belongs in the surrounding text
- Include the primary keyword naturally where it fits the image, but never force it
- Don't begin with "Image of..." or "Picture of..." because screen readers already announce that an image is being described
- For purely decorative images (dividers, background textures), use empty alt text (alt="") so screen readers skip them without announcing "image"
- Avoid keyword stuffing in alt text. Google warns that keyword stuffing creates a negative user experience and may cause your site to be seen as spam
- When an image is a link, its alt text works as the anchor text, so describe where the link goes
Comparing alt text quality:
Strong: alt="screenshot showing Google Search Console Page indexing report with 3 URLs excluded by robots.txt" Weak: alt="image optimization SEO tutorial image SEO best practices" Also weak: alt="image" or alt="" on a meaningful content image
For images containing text (infographics, screenshots with labels, charts), the alt text should include the text shown in the image, so the information isn't locked inside pixels.
For SVG elements, use a title element with a unique ID inside the SVG instead of alt text. Place a title element as the first child of the SVG element and reference it with aria-labelledby for full accessibility compliance.
3. Resize Images to Their Display Size
Don't upload a 4000x3000px photograph if it displays at 800x600px on your page. The browser downloads the full-resolution file regardless of the display size, then scales it down visually via CSS. This wastes bandwidth and directly slows LCP.
How to determine the right dimensions:
- Check the CSS or design spec for the maximum display width of the image container
- Multiply by 2 for retina/HiDPI displays (a 800px container needs a 1600px image source)
- Resize the image to those exact dimensions before export
For a standard blog post where images display at 800px wide: export images at 1600px wide for retina, compress them, and let CSS handle display scaling with max-width: 100%.
Typical export sizes for common slots (adjust them to your own layout):
| Image slot | Display width | Export width | File size target |
|---|---|---|---|
| In-article image | 800 px | 1600 px (2x for HiDPI) | Under 100 KB |
| Hero or LCP image | Full content width | Container width, up to 2x | Under 200 KB |
| Thumbnail or grid image | 300 px | 600 px | 30-40 KB |
| og:image | Fixed | 1200 x 630 px | Compressed JPEG or PNG |
For responsive layouts where the image displays at different sizes on different screens (full-width on mobile, half-width on desktop), use srcset rather than a single resized file. See Step 6 for the srcset implementation.
Tools for resizing:
- Squoosh (browser-based, free): drag, drop, choose dimensions and compare quality
- ImageMagick or Sharp (command-line/Node.js): batch resizing for large image libraries
- ImageOptim (Mac): lossless optimization after resizing
- WordPress image settings: set maximum dimensions to match your content width
One often-overlooked issue: featured images and og:image files. Many CMS themes display featured images at full width on archive pages and at a narrower width inside articles. Export a version sized for the widest display use case (typically 1200px+) and let the CMS handle intermediate sizes.
4. Compress Images Without Sacrificing Quality
Image compression reduces file size without changing display dimensions. The goal isn't the smallest possible file, but the smallest file size where compression artifacts aren't visible at normal viewing distance and the image still looks clean to the human eye.
Compression type matters:
- Lossy compression (JPEG, WebP lossy, AVIF): removes pixel data that's visually imperceptible at normal viewing size. The "quality" setting controls the trade-off. For JPEG, quality 75-85 is the industry standard target; below 75, compression artifacts become visible on sharp edges and text; above 85, file size increases with little visible improvement.
- Lossless compression (PNG, WebP lossless): preserves every pixel exactly. Useful for screenshots, icons, and images where absolute fidelity is required. Lossless PNG files can still be reduced through palette optimization tools like pngquant or PNGCrush, which reduce color depth without visible change.
Compression targets by use case:
- Standard content images (in-article photos, product images): aim for under 100 KB per image
- Hero images and above-the-fold images: aim for under 200 KB (lower is better for LCP)
- Thumbnails and grid images: aim for under 30-40 KB
- Icon sets served as individual files: aim for under 10 KB (or use SVG instead)
Compression quality reference:
| Format | Quality Setting | Use Case |
|---|---|---|
| JPEG lossy | 75-85 | Photos, standard content images |
| WebP lossy | 75-85 | Photos, illustrations, modern default |
| AVIF | 60-80 (AVIF scale differs) | High-performance images |
| PNG lossless | lossless + pngquant | Screenshots, transparency |
Recommended tools for image compression:
- Squoosh (squoosh.app): browser-based, free, side-by-side quality comparison
- TinyPNG or TinyJPEG (tinypng.com): simple drag-and-drop batch compression
- ImageOptim (Mac): lossless optimization applied locally
- ShortPixel or Imagify: WordPress plugins that auto-compress on upload
- Cloudflare Images or Cloudinary: CDN-integrated compression and format conversion
For JPEG, the sweet spot is a quality setting that keeps the image visually clean while staying under your target file size. Use the quality comparison slider in Squoosh to verify before exporting. Zoom in on fine detail areas (hair, fabric, text) to check for artifacts.
5. Choose the Right Image Format
See the Image Formats section above. The short rule:
- Photographs: WebP (primary), JPEG (fallback)
- Screenshots and UI: PNG or WebP
- Logos and icons: SVG
- Emerging default: AVIF with WebP fallback
Avoid serving JPEG for images that were originally PNG screenshots. Lossy compression adds visible artifacts to sharp edges and text. Avoid serving PNG for photographs. File sizes end up unnecessarily large.
6. Use Responsive Images with srcset and sizes
Responsive images ensure users on mobile devices download appropriately sized images rather than desktop-sized files scaled down via CSS. This reduces bandwidth use and speeds up load time on mobile.
The srcset attribute specifies multiple image versions at different resolutions:
<img
src="image-800w.jpg"
srcset="image-400w.jpg 400w, image-800w.jpg 800w, image-1200w.jpg 1200w"
sizes="(max-width: 600px) 400px, (max-width: 900px) 800px, 1200px"
alt="Descriptive alt text"
width="800"
height="600"
>
The browser selects the most appropriate source based on the device's viewport and pixel density. For Google Discover and social sharing, serve images at minimum 1200px wide so they qualify for large image previews.
Always include a src fallback attribute alongside srcset. This is required by the HTML specification and ensures older browsers get a working image source.
7. Implement Lazy Loading
Lazy loading defers the loading of off-screen images until the user scrolls near them. This reduces the amount of data downloaded on initial page load, improving both load speed and LCP for the visible viewport.
Modern browsers support native lazy loading via the loading attribute:
<img src="image.jpg" alt="Description" loading="lazy" width="800" height="600">
Don't apply lazy loading to the hero image or any image visible in the initial viewport. This delays the LCP element and worsens Core Web Vitals. Apply loading="lazy" only to images below the fold.
For the primary LCP image (typically the hero image), use fetchpriority="high" to signal to the browser that it should be loaded as a high-priority resource. web.dev advises doing this for one or two images at most, because marking more images as high priority stops the hint from helping:
<img src="hero.webp" alt="Hero image description" fetchpriority="high" width="1200" height="630">
8. Add Images to Your XML Sitemap
Image sitemaps help Google discover images that might otherwise be missed, particularly images loaded via JavaScript or images on pages that aren't frequently crawled. Submitting an image sitemap is especially valuable for image-heavy sites like photography portfolios, ecommerce stores, and news sites.
You can add image tags to your existing XML sitemap using the Google image sitemap namespace:
<url>
<loc>https://example.com/page/</loc>
<image:image>
<image:loc>https://example.com/images/photo.jpg</image:loc>
<image:title>Descriptive image title</image:title>
<image:caption>Optional caption text</image:caption>
</image:image>
</url>
Note: unlike regular sitemaps, you can include image URLs from other domains (such as a CDN) in image:loc elements. If you do, verify ownership of the CDN domain in Google Search Console.
Google has removed the optional image:caption, image:title, image:geo_location and image:license tags from its sitemap documentation, so image:loc is the tag that matters.
Most SEO plugins (Yoast, Rank Math) generate image sitemaps automatically. For the basics of sitemaps in general, see our guide to sitemaps for SEO. Submit your sitemap to Google Search Console under Sitemaps.
9. Add Structured Data for Images
Structured data helps Google understand what an image represents and enables rich results in Google Search. The ImageObject schema type at schema.org is the foundation for image structured data.
Structured data uses JSON-LD format in a script tag in the page head. The most common implementations for images:
To influence which image Google picks as the preview for a page, name a preferred image: use the primaryImageOfPage property on a WebPage, or an image property on the main entity (for example a BlogPosting with mainEntityOfPage). The og:image meta tag works too.
- Specify the image URL, width, and height in the schema
- Use the same image URL as your og:image tag for consistency
For product pages, use Product schema with the image property listing all relevant product images. Accurate product structured data with images, prices, and availability makes product images eligible for rich product results.
For recipes, products and videos, the image attribute is required to be eligible for the badge and rich results in Google Images.
Google accepts several ways to name a preferred image, so if you can't implement full JSON-LD, set og:image at minimum.
Use Google's Rich Results Test (search.google.com/test/rich-results) to validate your structured data after implementation.
10. Optimize Open Graph Image Tags
Open Graph meta tags control the image that appears when your page is shared on social media platforms and messaging apps. Google also accepts og:image as one way to name a preferred image for your page. Pages without one often show no image preview when shared, which tends to lower click-through on shares.
OG image guidelines:
- Minimum size: 1200x630 pixels (recommended by most platforms)
- Avoid extreme aspect ratios. A wide rectangle between 1.9:1 and 1:1 works across platforms
- Don't use a generic image such as a logo, or an image containing text, for article og:image tags, which is Google's own advice
- Use an image that directly represents the content of the page
- Include og:image:width and og:image:height meta tags alongside og:image
11. Serve Images via a CDN
A Content Delivery Network (CDN) serves images from edge servers geographically close to the user. For globally distributed audiences, a CDN can cut image load time because files come from a nearby edge server instead of your origin, and the gain grows with the visitor's distance from the origin.
CDNs also enable automatic format conversion: services like Cloudflare Images, Cloudinary, and ImageKit can automatically serve WebP to browsers that support it and JPEG as a fallback, without requiring you to store multiple versions of each image.
For international SEO, a CDN is particularly important. Without one, users far from your origin server experience significantly slower page loads, which can affect both rankings and conversion rates in those markets.
12. Optimize the Surrounding Page Context
Google doesn't evaluate images in isolation. Google's image SEO documentation says it extracts information about an image's subject from the content of the page, including captions and image titles, and recommends placing images near relevant text on pages relevant to the image. A product photo in the middle of an unrelated article sends a weaker relevance signal than the same photo next to a description of that product.
Best practices for optimizing page context around images:
Place images near topically relevant text: if you've an image of a compressed WebP file, place it adjacent to the paragraph that describes WebP compression. Don't bury it at the bottom of the article near unrelated content.
Write descriptive captions: Google reads captions as context for what an image shows. Keep them factual and descriptive (3-10 words or one short sentence), not keyword-heavy.
Match headings to image content: an image optimized for "WebP compression comparison" should appear under a heading about WebP compression or image formats. Don't place it under a heading about alt text or sitemaps. Heading-to-image alignment is a strong relevance signal.
Use consistent image URLs: if the same image appears on multiple pages, reference it from the same URL each time. Google caches images by URL, and consistent URLs allow Google to reuse the cached version without re-downloading. Inconsistent URLs (e.g., different CDN paths for the same image) force redundant downloads and can split the image's ranking signal across multiple URLs.
Use original images where you can. Stock photos appear on thousands of sites and add nothing new. Original screenshots, charts and photos are unique files that give visitors something to look at and give image search something distinct to index.
13. Write Captions That Add Context
A caption isn't the same thing as alt text. Alt text describes an image for screen readers and search engines; a caption is the short line of text a sighted visitor actually sees under or beside the image. Usability research from the Nielsen Norman Group, dating back to 1997, found that most web readers scan a page rather than read it word for word: about 79 percent scan while only 16 percent read every word. Captions sit directly in that scan path, so a caption that names the subject clearly gets read even by visitors who skip most of the surrounding paragraph.
Add a caption only when it genuinely adds context the image alone doesn't provide: a data point in a chart, the specific product shown in a photo, or the step number in a tutorial screenshot. Skip captions outright on purely decorative images. Keep captions short (one sentence or a short phrase) and factual, the same standard used for alt text, but don't repeat the alt text word for word.
14. Enable Browser Caching for Images
A CDN speeds up the first time a visitor loads an image. Browser caching speeds up every visit after that, and the two aren't the same technique. Without a caching header, a returning visitor's browser re-downloads every image on the page even though nothing changed.
For static, versioned image files (filenames that change whenever the image changes, such as a hashed or fingerprinted filename), Google's own web.dev performance documentation recommends a long cache lifetime:
Cache-Control: max-age=31536000
That value is one year in seconds. Because a versioned filename never gets reused for different content, there's no risk of serving a stale image even at that length: any real update ships under a new filename instead. A non-versioned image still needs a much shorter max-age, though, or a genuine update won't reach returning visitors until the cache expires. Most CDNs and static-asset pipelines can set the long-lived header automatically once versioned filenames are in place.
15. Replace Animated GIFs with Video
Animated GIFs can be very large. In the example in web.dev's guide to replacing GIFs with video, a 3.7 MB GIF became a 551 KB MP4 or a 341 KB WebM. Convert long or large animations to video and embed them with the attributes that make a video behave like a GIF:
<video autoplay loop muted playsinline width="640" height="360">
<source src="animation.webm" type="video/webm">
<source src="animation.mp4" type="video/mp4">
</video>
Keep GIF or animated WebP only for very short, small animations, and remember that a video is not an image in Google's eyes, so it won't appear in image search the way an <img> does.
Image Optimization and Core Web Vitals: Reducing LCP and CLS
Core Web Vitals is Google's framework for measuring page experience. Two of the three metrics (LCP and CLS) are directly affected by how images are handled.
Reducing LCP with Image Optimization
Largest Contentful Paint measures the time from navigation start to when the largest visible element renders. On most content pages, that element is a hero image, a banner or a featured image. web.dev splits LCP into four parts: time to first byte, resource load delay, resource load duration and element render delay. web.dev's guideline for a well-optimized page is about 40% for time to first byte, under 10% for resource load delay, about 40% for resource load duration and under 10% for element render delay. Image work targets the two middle parts: make the image discoverable in the HTML so it starts loading at once, and make the file small so it finishes quickly.

To improve LCP through images:
- Use WebP or AVIF to reduce file size and download time
- Add a preload link in the document head for the LCP image
- Set fetchpriority="high" on the LCP img element itself
- Ensure the LCP image isn't lazy-loaded (loading="lazy" delays LCP)
- Compress the LCP image aggressively, because every kilobyte saved shortens its download
- Consider inlining a low-quality image placeholder (LQIP) for instant visual feedback
If the LCP element is a CSS background image, convert it to an HTML img element so the browser finds it in the HTML and Google can index it. If you can't, preload it with fetchpriority="high".
Measure your current LCP with PageSpeed Insights at pagespeed.web.dev. The tool shows which element is your LCP and provides specific recommendations.
Preventing CLS by Specifying Image Dimensions
Cumulative Layout Shift measures how much visible content unexpectedly shifts as the page loads. Images without specified dimensions are one of the most common causes of CLS.
When the browser encounters an img tag without width and height attributes, it doesn't know how much space to reserve in the layout. When the image finally loads, the browser inserts it and pushes all the content below it downward. This creates a visible shift that's disruptive to users and penalized by CLS scoring.
The fix is simple: always specify both width and height attributes on every img element. The browser uses these values to calculate the aspect ratio and reserve the correct space before the image loads, eliminating the layout shift. You can still use CSS to make the image responsive (max-width: 100%; height: auto;). The browser handles scaling correctly once the space is reserved.
Good CLS target: under 0.1. Most image-related CLS issues can be resolved entirely by adding width and height attributes.
Optimizing Images for Google Lens and Visual Search
Google says Lens is used for nearly 20 billion visual searches every month, and at Google I/O 2025 Sundar Pichai said Lens grew 65 percent year over year. Users photograph products they want to buy, plants they can't identify, dishes they want to recreate and text they want to translate. Google matches those photographs against indexed images across the web.
Few image SEO guides treat Lens as its own surface. Audits routinely cover alt text, sitemaps and page speed, but rarely check whether product photos are sharp enough for visual matching or whether structured data supports shopping queries.
Google hasn't published ranking criteria for Lens, so treat the following as practical guidance rather than confirmed factors:
- Image resolution and clarity: Lens works on visual pattern matching. Blurry, low-contrast, or heavily compressed images are harder to match against user photographs. High-resolution images (at least 1200px on the longest side) with good lighting and clear subject matter match more reliably.
- Product schema markup: for product images, structured data with accurate product names, SKUs, prices, and availability makes product images eligible for rich product results and gives shopping surfaces clean data. Google hasn't published markup requirements specific to Lens.
- Accurate alt text: Lens combines visual analysis with text metadata. Describing the subject accurately in alt text helps Google connect visual queries to the right page.
- Canonical image URLs: if the same product image appears on multiple pages or URLs (common on ecommerce sites with category filters), use canonical tags to point to the preferred page. Images indexed at too many competing URLs may not rank well in any of them.
- Mobile image quality: the majority of Lens queries originate from smartphones pointed at real-world objects. Images that display sharply on mobile, not just desktop, are more likely to be recognized as matches.
For ecommerce, Google Lens is a high-intent channel. A user photographing a product on a store shelf is explicitly asking "where can I buy this?" Appearing in that Lens result is a direct path to a purchase. Product images with accurate schema markup, descriptive alt text, and high resolution are best positioned to capture this intent.
For content sites, Lens can surface infographics, charts, and screenshots when users photograph similar topics. Adding a subtle watermark or domain label to your original infographics provides attribution and brand recognition even when Lens surfaces them in results outside your site.
The blog.google search blog has documented Lens as a key area of investment, with features like "Search your screen" and shopping integration expanding Lens's role in the search ecosystem. Treating Lens optimization as a distinct component of your image SEO strategy positions your site ahead of competitors who are still focused solely on traditional image search.
Do AI Search Tools Like ChatGPT and Google AI Overviews Use Your Image Alt Text?
Yes, AI-powered search tools read the same alt text and surrounding page content that traditional search engines index, so descriptive alt text helps your images get referenced in AI-generated answers too. Google hasn't published a separate technical specification for how AI Overviews handle images: its official Search Central image guidance covers traditional Search, Google Images and Discover only, with no mention of AI Overviews or Gemini. That doesn't mean images sit outside the AI answer pipeline. AI Overviews (see our guide to how AI Overviews work) draw from the same crawled and indexed content that ranks in regular Search results, and a page's images and alt text are part of that content.
Third-party AI assistants work the same way. OpenAI's ChatGPT, Anthropic's Claude and Perplexity, the AI-native answer engine, all include a web search feature that retrieves and reads live pages before generating an answer. An <img> element with no alt text gives these tools nothing to reference beyond a raw file URL. New tools built specifically around AI-optimized alt text have started appearing in search results next to the traditional image-SEO guides, which is itself a signal that the underlying behavior is real, even before any platform publishes an official specification.

Practical steps for AI-search visibility overlap almost entirely with the fundamentals already covered above:
- Use real <img> elements, not CSS background-image, so the content is extractable at all.
- Write alt text that names the image's subject and context in a full descriptive phrase, not a keyword list. A generic crawler can't tell "chart" from "chart comparing average file size reduction across JPEG, WebP and AVIF," but the second version gives it a citable fact.
- Keep captions and the surrounding paragraph text specific. AI systems weigh the text immediately next to an image more heavily than distant page content when deciding what it shows.
- Treat vendor citation-rate claims as marketing estimates, not confirmed ranking factors, since none of them come from Google, OpenAI, Anthropic or Perplexity directly.
There's no dedicated schema or file format for AI visibility. The same images that already rank well in Google Images and Google Lens, described with real alt text and matched to relevant page content, are the ones an AI answer engine can understand and cite.
SEO Title Generator: eight title tag variations, sized for the SERP and intent-matched. Free, no signup.
Image SEO in WordPress: What Core Handles and What You Still Do
WordPress does part of the work for you. Since version 6.3, core adds fetchpriority="high" to the first large image on a page and lazy-loads images further down, as the WordPress 6.3 image performance notes describe. It has accepted WebP uploads since version 5.8, provided your host supports the format.
Everything that depends on judgment stays manual:
- Rename files before uploading, because the file name becomes part of the image URL.
- Write alt text in the media library or the block editor for every meaningful image, and leave decorative images with an empty alt attribute.
- Compress before upload or use a compression plugin such as ShortPixel or Imagify, then check the result in PageSpeed Insights.
- Avoid setting content images as section backgrounds in a page builder, because Google doesn't index CSS images.
- Check that your SEO plugin includes images in the sitemap and that the theme sets width and height on every image.
Image SEO Checklist: How to Audit Your Site's Images
Use this checklist before publishing new pages and periodically for site-wide audits. For a broader pre-publish pass beyond images, pair it with a full SEO audit checklist.
Pre-Publish Image SEO Checklist

Before publishing any page with images, verify:
- File names are descriptive and keyword-relevant (no IMG_0001.jpg)
- All images have alt text (short, descriptive, no keyword stuffing)
- Images are resized to their actual display dimensions
- Images are compressed (under 100 KB for standard images, under 200 KB for hero images)
- Image format is appropriate (WebP or AVIF preferred for photos; SVG for icons/logos)
- Width and height attributes are specified on every img element
- Hero/LCP image doesn't have loading="lazy"
- fetchpriority="high" is set on the LCP image
- All other below-fold images have loading="lazy"
- og:image meta tag is set with correct dimensions (1200x630px minimum)
- No SEO-critical images are using CSS background-image (use img instead)
- Meaningful images have a short, factual caption where a caption adds real context
- Static, versioned image files are served with a long Cache-Control max-age
- Large animated GIFs are replaced with video
Site-Wide Image Audit
Images are one part of a full technical SEO audit; run the checks below as part of it.
Run these checks periodically to catch image SEO issues across your entire site:
- Google Search Console: filter the Performance report by Search type: Image to see impressions and clicks from Google Images, and check that robots.txt doesn't disallow the image files you want indexed
- PageSpeed Insights (pagespeed.web.dev): run on your key landing pages to identify LCP issues, oversized images, and missing next-gen format usage
- Missing alt text scan: use a crawler (Screaming Frog free tier, Sitebulb, or a browser extension) to find all images with empty or missing alt attributes
- Image sitemap check: verify your image sitemap is submitted in GSC and includes your key product or content images
- CLS audit: use PageSpeed Insights or Lighthouse to identify CLS caused by missing image dimensions
| Tool | What It Checks | Free |
|---|---|---|
| Google Search Console | Image search performance, indexing, sitemaps | Yes |
| PageSpeed Insights | LCP, CLS, image optimization opportunities | Yes |
| Squoosh | Individual image compression and format conversion | Yes |
| TinyPNG | Batch compression for PNG and JPEG | Free tier |
| Screaming Frog SEO Spider | Site-wide alt text audit, missing dimensions | Free up to 500 URLs |
| ImageOptim | Lossless optimization for Mac | Yes |
| ShortPixel or Imagify | Automatic optimization for WordPress | Free tier |
Image SEO issues rarely have quick single fixes. The most effective approach is running the pre-publish checklist consistently for every new page, then doing a quarterly site-wide audit to catch any accumulated issues.
Frequently Asked Questions About Image SEO
Does image file size affect SEO rankings?
Image file size affects SEO indirectly, through page speed and Core Web Vitals. Google highly recommends good Core Web Vitals, and oversized images are one of the most common causes of slow loading. A large uncompressed hero image can push LCP past the 4-second "poor" threshold and hurt the user experience. Compress standard content images to under 100 KB and hero images to under 200 KB.
Are WebP images better for SEO than JPEG?
WebP images are generally better for SEO than JPEG because they're 25-35% smaller at comparable visual quality, which improves page load speed and LCP. WebP is supported by more than 97% of browsers. For the remaining browsers, use the picture element to serve a JPEG fallback. If AVIF fits your workflow, it can compress even further, and all current major browsers support it.
What is the best file size for web images?
Google doesn't set a number. A practical target is under 100 KB for standard in-article images, under 200 KB for hero images and 30-40 KB for thumbnails. Resize to the display size first, then compress, and check the result in Squoosh or PageSpeed Insights.
What does an image optimizer do?
An image optimizer is a tool or plugin that shrinks image files for the web. It resizes images to the size they are displayed at, compresses them, strips unneeded metadata and often converts them to WebP or AVIF. Squoosh, TinyPNG, ImageOptim, ShortPixel and Imagify are common examples, and a CDN such as Cloudflare Images or Cloudinary can do the same at delivery time.
How many images should an article have for SEO?
There's no fixed number. Articles should use images where they add value: to illustrate a process, compare options, show a screenshot, or break up long text. Informational how-to guides benefit from step-by-step screenshots or diagrams. Comparison articles benefit from a visual comparison table or side-by-side screenshots. Avoid using filler stock photos that add no informational value. These increase page load time without helping the reader or SEO relevance.
Do alt text and image file names still matter for SEO in 2026?
Yes. Google's image SEO documentation calls alt text the most important attribute for image metadata and says file names give very light clues, both used alongside computer vision and the page content. Computer vision has improved a lot, but it works with text signals, not instead of them. A well-described image with accurate alt text, a descriptive file name and relevant surrounding text is easier for Google to interpret than the same image with empty alt text and a generic file name.
Does adding alt text help my images show up in AI Overviews or ChatGPT answers?
Descriptive alt text gives AI search tools text to work with when they decide what an image shows, the same way it already helps traditional image search and Google Lens. Google hasn't published separate technical requirements for images in AI Overviews, so treat this as the same alt text and structured-content discipline that already applies to Google Images, not a separate strategy.