Direct answer: image SEO starts with ordinary, crawlable HTML. Put an important image in an <img> element with a real src URL, write a text alternative that matches the image's purpose on that page, provide honest candidates through srcset and sizes where responsive variants are genuinely useful, reserve its aspect ratio with width and height, and choose eager or lazy loading from its actual viewport role. Then verify the source HTML, rendered layout, selected file, crawl access, and landing-page context.
Narrow job: this guide owns responsive image markup, discovery, alternative text, dimensions, loading boundaries, and validation. Use the Core Web Vitals guide when the page already has an LCP, CLS, or INP problem. Use the SEO-friendly web design checklist when the wider page hierarchy, templates, navigation, or launch contract is still undecided.
Choose the image job before the file
| Image job | Text alternative | Typical loading rule |
|---|---|---|
| Primary product, service, or article image | Describe the subject and the detail that matters in this page context | Eager when visible in the first viewport; otherwise test its real position |
| Supporting photograph or diagram | State the information the image adds; put complex explanation in nearby text | Usually lazy when safely below the first viewport |
| Linked image with no equivalent link text | Describe the destination or action, not merely the pixels | Based on viewport position and importance |
| Pure decoration or redundant visual | Use alt="" when an <img> is still appropriate | Usually lazy unless it is critical to the initial composition |
| CSS background | No native image alternative or Google Image discovery through the element | Keep for decoration, not the only version of meaningful content |
The same file can need different alternative text in different contexts. A hotel-room photograph on a room page may need to identify the balcony and bed layout; the same image beside a link to that room may need to communicate the destination. Decide why the image exists before naming files, generating variants, or writing markup.
1. Put important images in crawlable HTML
Google's image documentation says it can find images referenced by the src attribute of an <img> element, including an <img> inside <picture>. It does not index CSS background images. That makes an ordinary image element the safest base: it carries the image URL, alternative text, dimensions, loading behavior, and responsive candidates without requiring JavaScript.
<picture>
<source
type="image/webp"
srcset="/images/coast-480.webp 480w,
/images/coast-768.webp 768w,
/images/coast-960.webp 960w,
/images/coast-1536.webp 1536w"
sizes="(max-width: 980px) calc(100vw - 40px), 940px">
<img
src="/images/coast-1536.jpg"
srcset="/images/coast-480.jpg 480w,
/images/coast-768.jpg 768w,
/images/coast-960.jpg 960w,
/images/coast-1536.jpg 1536w"
sizes="(max-width: 980px) calc(100vw - 40px), 940px"
width="1536"
height="864"
alt="Rocky coastline photographed from a cliff above a calm bay">
</picture>
This example provides WebP candidates first and a genuine JPEG fallback through both img src and img srcset. Use <picture> when you need format fallback or deliberate art direction; if every candidate is the same visual in the same format, an <img srcset sizes> is enough.
Keep meaningful URLs in the HTML. A placeholder in src plus the real URL in a custom data-src attribute makes discovery depend on JavaScript. Native loading="lazy" can defer an offscreen image while its real URL stays in the element.
2. Write alt text for the context
Useful alternative text is a replacement for the image's purpose, not a bag of keywords. Google uses it with page content and computer vision to understand an image, while assistive technology uses it when the image cannot be perceived. Write the shortest text that preserves the information or function the reader would otherwise lose.
- Informative photograph: describe the subject and the page-relevant detail, such as
alt="Two-bedroom suite with a balcony facing the bay". - Functional image: describe the action or destination, such as
alt="View the two-bedroom suite", when no adjacent link text already does that job. - Complex chart or diagram: give a concise identification in
altand provide the result, data, or explanation in nearby text. - Decorative or redundant image: use an empty alternative,
alt="", so it does not create repeated audible clutter.
Put the image near the text it supports. Use a caption when attribution, method, location, or a key interpretation should be visible to everyone. A short descriptive filename can provide a light clue, but it cannot repair an irrelevant landing page or replace alternative text. Do not repeat the title, caption, and keywords mechanically in every field.
3. Create honest source candidates
For resolution switching, every candidate should show the same essential image at a different intrinsic width. The number beside a w descriptor is the file's real pixel width, not a target viewport or an arbitrary label. Keep the crop and subject consistent unless you are deliberately using <picture> for art direction.
Choose a small set around actual rendered slots and common pixel densities. A full-width article image that renders near 940 CSS pixels does not need a dozen candidates separated by tiny increments. It may need a compact mobile file, one or two intermediate files, and a larger candidate for wide or high-density displays. Inspect the page's CSS and traffic mix before standardizing the set.
Format is an engineering choice, not a ranking badge. As verified on September 1, 2026, Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF when they are referenced from img src. Choose among them for photographic quality, transparency, animation, browser support, processing reliability, and file weight. A sharp, relevant image in a suitable older format is better than a damaged conversion made only to clear a tool warning.
4. Make sizes describe the rendered slot
srcset tells the browser which files exist. sizes tells it how wide the image is expected to render under the first matching media condition. The browser combines that slot with device pixel density and other conditions to choose a candidate. It can choose a larger file than the CSS width on a high-density screen, so the selected URL is not determined by viewport width alone.
srcset="
/images/coast-480.webp 480w,
/images/coast-768.webp 768w,
/images/coast-960.webp 960w,
/images/coast-1536.webp 1536w"
sizes="(max-width: 980px) calc(100vw - 40px), 940px"
Read this from left to right: up to a 980-pixel viewport, the image occupies the viewport minus 40 pixels of horizontal padding; after that, its slot is capped at 940 pixels. If a width-descriptor srcset omits sizes, the default is effectively 100vw. That can make a two-column card or a capped article image look much wider to the selection algorithm than it really is and cause avoidable downloads.
Do not copy a sizes string from another template without comparing the actual layout. Test card, article, gallery, and product templates separately. A correct rule mirrors the CSS well enough to guide selection; it does not need to reproduce every layout declaration.
5. Reserve space with intrinsic dimensions
Add width and height to the <img> using the intrinsic dimensions of the referenced source or its matching aspect ratio. Modern browsers can use those values to reserve space before the file arrives. Responsive CSS can still render the image fluidly:
img {
max-width: 100%;
height: auto;
}
The attributes are not instructions to force a 1536-pixel-wide image onto a phone. They provide an intrinsic ratio and fallback size; CSS controls the rendered box. If art-directed sources use different crops or aspect ratios, each <source> can declare its own width and height; test the selected source at every breakpoint.
Reserved space protects reading and tapping from sudden movement, but it does not prove that the file is appropriately sized or prioritized. Use the Core Web Vitals diagnosis when you need to measure whether image discovery, bytes, server delay, CSS, or layout shifts are affecting real performance.
6. Set a real loading boundary
Do not apply one loading rule to every image. Images visible in the first viewport should normally use the browser's default eager behavior. If one is likely to be the Largest Contentful Paint element, keep its URL discoverable in the initial HTML and consider fetchpriority="high" after confirming the candidate. Do not add high priority to a whole gallery; competing priority hints stop being useful.
Use loading="lazy" for images that are genuinely outside the initial viewport. Keep their real src or srcset in the markup and provide dimensions. Google's lazy-loading guidance says relevant content should load when it becomes visible without requiring a click, swipe, or typed action because Google Search does not interact with the page.
For a lazy-loaded responsive image, sizes may start with auto, for example sizes="auto, (max-width: 980px) calc(100vw - 40px), 940px". Supporting browsers can use the image's width attribute or CSS width; the remaining values provide a fallback.
| Position | Markup decision | Failure to watch for |
|---|---|---|
| Likely LCP hero | Eager; real URL in initial HTML; high priority only when justified | Lazy loading, script-injected URL, or several competing high-priority images |
| Supporting image just below the opening | Test on representative phone heights before deciding | A “below fold” assumption that is false on a large phone or short desktop window |
| Deep article, gallery, or related card image | Native lazy loading with dimensions and real image URLs | Zero-sized placeholders, user-action dependency, or custom data attributes only |
7. Keep image URLs discoverable and stable
The landing page and image both need to be accessible. Check that the page is indexable, the chosen image URL returns the intended file, and neither is blocked by authentication, a robots rule, a broken hotlink policy, or a temporary signed URL. If a CDN uses a different hostname, Google recommends verifying that hostname in Search Console so crawl errors can be reported.
- Use stable URLs and reference the same image consistently when the asset is unchanged. If you add a query-string version token, change it only when the image file itself changes.
- Place important images on relevant, crawlable landing pages near useful text.
- Use a normal image sitemap when important image URLs are otherwise difficult to discover; do not use it as a substitute for crawlable page markup.
- Keep preferred-image metadata aligned with a relevant visible asset. Google may use
primaryImageOfPage, animageproperty attached to the page's main entity such asBlogPosting, andog:imagewhen selecting image previews. Use a relevant, representative, high-resolution image without an extreme aspect ratio. - Use licensing or creator metadata only when you actually own and maintain the necessary rights information.
Discovery is not an indexing or ranking guarantee. Google chooses image previews automatically from multiple signals, and a valid implementation can still be excluded, delayed, or shown for different queries than expected.
8. Validate source, render, selection, and crawl
A visual desktop check is not enough. Validate the layer that can fail:
- Source HTML: confirm the meaningful
<img>, fallbacksrc,srcset,sizes, dimensions, alternative text, and loading attribute are present before optional scripts run. - Rendered layout: inspect representative mobile and desktop widths, zoom, long text, missing optional images, and slow loading. Confirm there is no page-level overflow or unexpected layout movement.
- Candidate selection: use browser developer tools to inspect
currentSrc, rendered width, natural width, device pixel ratio, request timing, response type, and transferred bytes. Reload with cache disabled when testing selection. - Loading boundary: verify the likely LCP image starts early and deep images wait. Do not infer this from markup alone when CSS, preload hints, a carousel, or client rendering can change the result.
- Crawl access: request the landing page and representative image URLs as a normal user and crawler, check the final status and content type, and review robots rules.
- Search evidence: use Search Console URL Inspection for the landing page when current Google access matters. Treat image-search appearance as an observed outcome, not something markup can promise.
Inspectable FloxoLab example: this page advertises 480, 768, 960, and 1536 pixel hero candidates, describes a mobile fluid slot capped at 940 pixels, reserves a 16:9 box with width="1536" and height="864", keeps the PNG fallback in src, and eagerly prioritizes the hero. Article images below the first viewport use native lazy loading only where their position warrants it.
What not to do
- Do not hide meaningful images in CSS backgrounds. Use CSS for decoration and an image element for content that needs discovery and an alternative.
- Do not stuff alt text. Repeating query variants makes the alternative worse for people and does not create a better image.
- Do not invent width descriptors. A file marked
960wmust actually be 960 pixels wide. - Do not omit
sizesfrom a width-basedsrcset. The default can overstate a narrow slot. - Do not lazy-load the likely LCP image. Confirm the page's real first viewport and priority before adding the attribute.
- Do not add
fetchpriority="high"to every visible image. Priority is useful only when it distinguishes the most important request. - Do not convert formats only to satisfy an audit label. Compare fidelity, bytes, transparency, support, and processing reliability.
- Do not treat an image sitemap or schema property as proof of indexing. They support discovery and eligibility, not guaranteed appearance.
Responsive image verification checklist
- Every important image has a defined page job and relevant landing-page context.
- Meaningful images use crawlable
<img>markup with a real fallbacksrc. - Alternative text communicates information or function; decorative images use
alt="". - Every width descriptor matches the candidate file's real intrinsic width.
sizesapproximates the rendered slot for that specific template.widthandheightreserve the intended aspect ratio.- The likely LCP image is eager and discoverable; genuinely offscreen images use tested lazy loading.
- Image and landing-page URLs are accessible, stable, and not unintentionally blocked.
- Social and structured-data image references match a relevant visible asset.
- Mobile and desktop rendering,
currentSrc, request timing, content type, and crawl access have been checked.
Evidence basis
Discovery through img src, responsive-image fallbacks, supported formats, page context, filenames, alternative text, metadata, image sitemaps, and stable URLs were checked against Google Search Central on September 1, 2026. Responsive candidate selection, intrinsic dimensions, alternative-text semantics, and loading behavior were checked against the current HTML Standard, MDN, W3C WAI, and web.dev. The eight-step implementation and validation sequence is FloxoLab's practical framework.
- Google Search Central: image SEO best practices
- Google Search Central: crawlable lazy-loaded content
- WHATWG HTML Standard: the image element, source sets, and alternative content
- MDN: responsive images with
srcset,sizes, andpicture - W3C WAI: alternative-text decision tree
- web.dev: native image lazy loading and dimension attributes
- web.dev: image discovery and priority for Largest Contentful Paint
Need responsive media checked across a real template?
FloxoLab can inspect crawlability, image selection, alternative text, loading priority, layout stability, metadata, and the actual requests a representative page makes.
Explore the SEO audit