From Invisible to #1 on Google Maps. · 14 years experience · Book your free audit claim yours →
Technical SEO

Advanced Image SEO: Formats, Responsive Delivery, LCP and Structured Data

Serve the right format and size, load the hero fast, describe every image clearly, and help Google find it, with markup you can copy.

For: Local business owners, marketers and developers who manage service-page and gallery images

The snippet.html example from this guideA code editor showing the first lines of the snippet.html example used in the guide.snippet.html1<picture>2<source type="image/avif" srcset="/img/hvac…3<source type="image/webp" srcset="/img/hvac…4<img src="/img/hvac-crew-1600.jpg"5srcset="/img/hvac-crew-800.jpg 800w, /i…6sizes="(min-width: 960px) 960px, 100vw"7width="1600" height="900"8alt="Two technicians installing a heat …9</picture>2.5sGoogle's good LCPthreshold at the 75t…0.1Good CLS threshold; widthand height attribute…3Formats to serve: AVIF,WebP and a JPEG fallback
2.5sGoogle's good LCP threshold at the 75th percentile
0.1Good CLS threshold; width and height attributes prevent most image shifts
3Formats to serve: AVIF, WebP and a JPEG fallback
1Image per page that should get fetchpriority high

Most image SEO advice stops at "add alt text and compress your photos." That is table stakes. On a local service site, images are usually the heaviest assets on the page, the most common Largest Contentful Paint element, and one of the few places where a technical decision changes both your Core Web Vitals and your visibility in Google Images and visual search results. A 1.8 MB hero photo of a van or a storefront can quietly cost you more than a missing meta description ever will.

This guide covers the layer beyond the basics: choosing modern formats, serving the right pixel dimensions with srcset and sizes, lazy-loading without hurting LCP, naming and describing files so search engines understand them, image sitemaps, structured data, CDN delivery, and priority hints. Every section includes markup you can adapt, and the checklist at the end maps each change to the metric it moves.

Best use case: Image formats, browser support and Google's image guidelines change, so retest on your own pages and check Google's current documentation before rolling out sitewide.

Choose formats by delivery, not by hype

AVIF and WebP are supported by all current major browsers, and Google Search can index both alongside JPEG, PNG, GIF, BMP and SVG. The practical question is not whether to use them but how to deliver them safely. AVIF typically produces the smallest files for photographic content, WebP is faster to encode and handles transparency and simple graphics well, and JPEG remains the universal fallback. Exact savings depend on the image, so test on your own assets instead of trusting a headline percentage.

The most portable way to serve multiple formats is the <picture> element. The browser picks the first source it supports, and the nested <img> carries the alt text, dimensions and fallback. Because Google indexes the <img> inside <picture>, you do not lose indexability by adding sources.

<picture>
  <source type="image/avif" srcset="/img/hvac-crew-800.avif 800w, /img/hvac-crew-1600.avif 1600w" sizes="(min-width: 960px) 960px, 100vw">
  <source type="image/webp" srcset="/img/hvac-crew-800.webp 800w, /img/hvac-crew-1600.webp 1600w" sizes="(min-width: 960px) 960px, 100vw">
  <img src="/img/hvac-crew-1600.jpg"
       srcset="/img/hvac-crew-800.jpg 800w, /img/hvac-crew-1600.jpg 1600w"
       sizes="(min-width: 960px) 960px, 100vw"
       width="1600" height="900"
       alt="Two technicians installing a heat pump outside a Denver home">
</picture>

Two working rules. First, compress for the display size, not the camera size: a 6000-pixel original rendered at 960 CSS pixels is wasted bandwidth. Second, pick quality by eye per image class. As a starting point, many teams land around quality 50 to 65 for AVIF and 70 to 80 for WebP on photos, then check faces, text overlays and gradients for banding. Treat those numbers as a first pass, not a standard. Keep logos, icons and simple illustrations as SVG where possible, since they scale without extra files.

Responsive images: srcset and sizes that tell the truth

The most common srcset bug is a missing or wrong sizes attribute. Without it, the browser assumes the image fills the viewport width and often downloads a file far larger than needed. The w descriptors in srcset describe each file's intrinsic width; sizes describes how wide the image will actually render in your layout. The browser multiplies that by the device pixel ratio and picks the closest candidate.

Write sizes from your real CSS. If a service-card image takes one third of a 1200-pixel container on desktop, half the screen on tablets and the full width on phones, say exactly that:

<img src="/img/drain-cleaning-600.webp"
     srcset="/img/drain-cleaning-400.webp 400w,
             /img/drain-cleaning-600.webp 600w,
             /img/drain-cleaning-900.webp 900w"
     sizes="(min-width: 1200px) 400px,
            (min-width: 700px) 50vw,
            100vw"
     width="600" height="400"
     alt="Plumber clearing a kitchen drain with a drain snake"
     loading="lazy" decoding="async">

Generate widths in sensible steps, roughly 1.5x to 2x apart, rather than ten near-identical sizes that bloat your storage and cache. Always include width and height attributes that match the intrinsic aspect ratio. Modern browsers use them to reserve space before the file loads, which is the single most reliable fix for image-driven Cumulative Layout Shift. Pair them with img { max-width: 100%; height: auto; } so layouts stay fluid.

Avoid delivering key content images as CSS backgrounds. Google's image documentation focuses on the HTML <img> element, so a background-image photo of your finished work may never be associated with the page for image search. Use CSS backgrounds for decoration only. For how those images then get discovered when someone searches by photo instead of by keyword, see our guide to multimodal search optimization for local businesses.

Lazy-loading without hurting LCP

Native lazy-loading is excellent for below-the-fold images and harmful for the one image that defines your LCP. A lazy-loaded hero is not requested until layout confirms it is near the viewport, which delays the very element the Largest Contentful Paint metric is waiting for. Google's good LCP threshold is 2.5 seconds or less at the 75th percentile of real-user visits, so a self-inflicted delay on the hero is expensive.

The rule is simple: eager for anything likely to be in the first viewport, lazy for everything else. Be careful with plugins and themes that add loading="lazy" to every image automatically, including the logo and hero. Inspect the rendered HTML, not the template.

<!-- Above the fold: the LCP candidate -->
<img src="/img/storefront-1200.avif" width="1200" height="675"
     alt="Front entrance of Harbor Dental in Tacoma"
     fetchpriority="high" decoding="async">

<!-- Below the fold -->
<img src="/img/waiting-room-800.avif" width="800" height="533"
     alt="Waiting room with children's reading corner"
     loading="lazy" decoding="async">

Do not use loading="lazy" together with a JavaScript-only pattern that stores the real URL in a data-src attribute and has no fallback. Crawlers that do not execute your scroll handlers may never see the image. Native lazy-loading keeps the real src in the HTML, which is why it is the safer default. If you must use a script, include a <noscript> fallback and verify the image appears in the rendered HTML in Search Console's URL Inspection tool.

Also watch for carousels. Only the first slide is the LCP candidate; the remaining slides should be lazy. A carousel that loads six full-size slides on first paint competes with the one image that matters.

Priority hints, preload and decoding

Browsers discover images through the HTML parser, then guess their priority. fetchpriority="high" overrides the guess for your LCP image, and fetchpriority="low" can demote decorative images that would otherwise compete with it. Used on a single hero image, it commonly improves LCP by moving that request ahead of scripts and other images in the queue.

If the LCP image is not in the initial HTML, for example because it is injected by JavaScript or set by a CSS background, add a preload so the browser can fetch it early. For responsive images, preload must mirror the srcset logic or you will download the wrong file twice:

<link rel="preload" as="image"
      href="/img/hero-1200.avif"
      imagesrcset="/img/hero-600.avif 600w, /img/hero-1200.avif 1200w, /img/hero-1800.avif 1800w"
      imagesizes="100vw"
      type="image/avif"
      fetchpriority="high">

Use preload sparingly. If the hero is already a plain <img> in the document, fetchpriority="high" alone is usually enough, and an extra preload for a format that a visitor's browser cannot decode wastes a request. The type attribute prevents that.

decoding="async" lets the browser decode an image off the main thread so it does not block rendering of other content. It is a safe default for most images. For the LCP image, some teams leave decoding at the default, and results vary, so measure rather than assume. A related tip: do not combine fetchpriority="high" with loading="lazy" on the same element. They send contradictory signals.

Filenames, alt text and surrounding context

Google uses the image file name, the alt text, nearby text, the page title and the page topic to understand what an image shows. None of that requires tricks. It requires that the signals agree with each other and with reality.

Filenames. Use short, hyphenated, descriptive names: tankless-water-heater-install-austin.jpg beats IMG_4471.jpg and beats best-plumber-austin-cheap-plumber-near-me.jpg. Include a place name only when the photo is genuinely of that place. Keep URLs stable; renaming an image or changing its path on every deploy forces re-discovery and can drop it from image results temporarily. If your blog images also show up in shared links, our guide to featured images and social sharing tags covers the Open Graph setup and the image sizes that display well.

Alt text. Describe what a person using a screen reader would need to know, in a sentence fragment, ideally under about 125 characters. Good: alt="Roofer replacing storm-damaged asphalt shingles on a two-story home". Weak: alt="roof". Harmful: a pile of keywords. Decorative images, such as dividers or background flourishes, should use an empty alt="" so assistive tech skips them. Where an image is the link text, the alt text works as the anchor text, so make it describe the destination. Accessibility and image SEO overlap here, and our guide to web accessibility and SEO covers where else the two goals align.

Context. Place the image near the paragraph that discusses it, add a caption with <figure> and <figcaption> when it adds information, and make sure the page title and headings support the same topic. On a service page, a before-and-after photo with a caption such as the job type and neighborhood is stronger than the same photo dropped into a generic gallery grid.

One local-specific caution: real photos of your own work, team and location are more valuable than stock imagery, both for users and for differentiating your pages. If you do use stock photos, do not rely on them as the only visual content of a page you want to rank.

Image sitemaps and structured data

Most images on normal pages are discovered through the HTML. An image sitemap helps when images load through JavaScript, sit in galleries or are served from a CDN on a different hostname. You can add image entries to an existing sitemap using the image namespace. Google has simplified its support over time, and the image:loc tag is the one you need; older optional tags such as caption, title, geo_location and license are no longer used by Google, so do not spend effort on them.

<?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/services/roof-replacement</loc>
    <image:image>
      <image:loc>https://cdn.example.com/img/roof-replacement-after.avif</image:loc>
    </image:image>
    <image:image>
      <image:loc>https://cdn.example.com/img/roof-replacement-crew.avif</image:loc>
    </image:image>
  </url>
</urlset>

If images live on a CDN domain, make sure that host is verified in Search Console when possible, and that your robots.txt on both hosts does not block Googlebot-Image or the image directory.

Structured data adds explicit context. The most valuable application is attaching images to the entities Google already supports: Product, Recipe, Article, LocalBusiness, Event and others, using the image property with crawlable URLs. Provide multiple aspect ratios (16:9, 4:3 and 1:1) at reasonable resolution so Google can choose the right crop. For licensable photos, ImageObject metadata can power the Licensable badge in Google Images:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ImageObject",
  "contentUrl": "https://www.example.com/img/kitchen-remodel-after.jpg",
  "creator": { "@type": "Organization", "name": "Example Remodeling Co." },
  "creditText": "Example Remodeling Co.",
  "copyrightNotice": "(c) 2026 Example Remodeling Co.",
  "license": "https://www.example.com/image-license",
  "acquireLicensePage": "https://www.example.com/image-licensing-info"
}
</script>

Only mark up what is true and visible on the page. Structured data that describes an image users cannot see, or a license you do not offer, risks a manual action rather than a rich result. Validate with Google's Rich Results Test before shipping.

CDN delivery, caching and measuring the result

An image CDN with on-the-fly transformation (resize, format conversion, quality) lets you store one high-quality original and request variants by URL. That removes most of the build-time work of producing every width and format. Whether you use a managed service or an open-source resizer behind your own CDN, check four things.

First, format negotiation. Some CDNs choose AVIF, WebP or JPEG from the browser's Accept header. If you do this, the response must send Vary: Accept so shared caches do not hand a WebP to a browser that cannot decode it. Explicit <picture> sources avoid this class of bug entirely. Second, caching. Use fingerprinted or versioned filenames and a long lifetime:

Cache-Control: public, max-age=31536000, immutable
Vary: Accept
Content-Type: image/avif

Third, connection cost. If images come from a different hostname, add <link rel="preconnect" href="https://cdn.example.com"> for the host that serves your LCP image. Fourth, stable URLs: avoid signed or tokenized query strings that change per request, because they break caching and make image indexing unreliable.

To measure the impact, separate lab and field data. In Lighthouse or PageSpeed Insights, look at the LCP element and its breakdown into time to first byte, resource load delay, resource load duration and element render delay. A large load delay usually means discovery or priority problems (lazy-loading, late injection, missing fetchpriority). A large load duration means the file is too big or the connection is slow. Then confirm in field data, such as Search Console's Core Web Vitals report or the Chrome UX Report, which reflects real visitors. Remember that lab gains can take weeks to show in the field because the metric uses a rolling 28-day window.

If you want a quick inventory of which pages are carrying oversized or unoptimized images, run a crawl-based check with our website SEO audit and sort by page weight before you start converting files.

A prioritized rollout checklist

Do not convert an entire media library on day one. Work from highest impact to lowest, and verify after each step.

  1. Fix the LCP image on your top landing pages. Remove loading="lazy", add fetchpriority="high", serve the right width, and confirm in PageSpeed Insights that the LCP element is the one you expect.
  2. Add width and height to every image. This is typically the fastest CLS win and costs almost nothing.
  3. Introduce srcset and sizes on templates (service cards, blog headers, galleries) so every instance benefits at once.
  4. Add AVIF and WebP through <picture> or your CDN, keeping a JPEG fallback.
  5. Rewrite filenames and alt text on priority pages, starting with the images that illustrate your core services.
  6. Publish image sitemap entries and structured data for pages where images matter, then monitor the Images search appearance filter in Search Console for impressions and clicks.

Run the list again each quarter. Themes update, editors upload 5 MB originals, and new plugins quietly change loading behavior. For a broader view of how performance, content and entity signals work together, browse the rest of our advanced SEO guides.

FAQ

Should I switch every image to AVIF?

Not necessarily. AVIF often gives the smallest files for photos, but encoding is slower and some images look better as WebP or JPEG at equal size. Serve AVIF and WebP through the picture element or a CDN, keep a JPEG fallback, and compare results on your own key images before converting everything.

Does lazy-loading hurt SEO?

Native lazy-loading is safe for crawling when the real src stays in the HTML, and it helps page speed. It hurts when applied to the LCP image, which delays your largest element. Lazy-load below-the-fold images only, and avoid JavaScript-only patterns that hide the real image URL from crawlers.

Do I need an image sitemap?

Not for every site. Standard pages with img tags are discovered through normal crawling. An image sitemap helps when images load through JavaScript, live in galleries, or are served from a CDN domain. Google only needs the image loc tag; older caption and title tags are no longer used.

How long should alt text be?

Write what is needed to understand the image, usually a short sentence under roughly 125 characters. Describe the subject plainly, include a service or place term only when it is true, and never stuff keywords. Use an empty alt attribute for purely decorative images so screen readers skip them.

How do images affect Core Web Vitals?

Images most often drive LCP, since the hero photo is frequently the largest element, and CLS, when width and height are missing so the layout shifts as files load. Proper dimensions, correct priority, right-sized files and modern formats improve both metrics, and indirectly help INP by reducing main-thread work.

Turn this into a practical SEO action plan

Use RankLocalToday tools to check rankings, diagnose website issues, and prioritize the next organic traffic move.

Get your SEO plan →