Jump to a section +
Give every image a job before optimizing it
Start with the page decision, not the file extension. A roofer’s close-up of a flashing repair can prove workmanship. A dentist’s office photo can reduce uncertainty about the visit. A labeled product diagram can answer a fit question. A generic handshake photo may consume space and bytes without making the business easier to choose. Google recommends high-quality images near relevant text because surrounding content helps people and search systems understand the subject. Original imagery can carry business-specific evidence that a widely reused stock photo cannot, but “original” is not a ranking guarantee. The image still needs a clear purpose, lawful use, and a page that answers a real search need.
Build an export recipe around the content
Keep a high-quality master outside the website, then make delivery versions from it. Crop for the actual composition instead of asking CSS to hide most of a giant source. Decide the largest rendered size across supported layouts and high-density screens, then create a small set of useful widths rather than one original camera file. Compression is visual judgment: product texture, fine text, faces, gradients, and line art fail in different ways. Compare candidates at their rendered size, not only zoomed to 400 percent or reduced to a file-size target with no quality review.
Format choices are content decisions, not SEO badges
| Image kind | Useful starting formats | Check before shipping |
|---|---|---|
| Photograph | AVIF or WebP, with JPEG where workflow or support requires it | Skin, texture, fine detail, encoding time, and acceptable quality |
| Logo or simple icon | SVG when it is a trustworthy vector asset | Accessible name, sharp rendering, security, and no embedded text dependency |
| Transparency or crisp raster graphic | WebP, AVIF, or PNG when lossless detail is required | Whether the design can be built as HTML/CSS or vector instead |
| Animated demonstration | Appropriate video delivery rather than a large animated GIF | Controls, captions where needed, poster image, motion preferences |
| Screenshot with text | Lossless or carefully encoded WebP/PNG | Legibility at mobile size and a text explanation outside the image |
No format wins every time. Web.dev notes that images may become the Largest Contentful Paint element, so efficient encoding can matter directly to the moment the main content appears. Modern formats often provide useful compression, but the browser still needs correct dimensions and a discoverable request. A tiny but late image can produce poor LCP. A perfectly encoded image can still create layout shift. Optimization needs an asset decision and a delivery decision.
Send the right candidate to each layout
The `srcset` attribute can list image candidates with their intrinsic widths, and `sizes` can describe how wide the image will render under different layout conditions. The browser combines that information with viewport and device characteristics to select a candidate. This prevents a narrow phone card from always downloading the image intended for a wide desktop hero. The default `src` remains important as a supported fallback and discovery path. Test the browser’s chosen current source at several widths; an inaccurate `sizes` value can make it download a file larger or smaller than the layout needs.
Add intrinsic `width` and `height` attributes that match the source aspect ratio. Responsive CSS can still make the image fluid, while the browser reserves space before the file arrives. That reduces unexpected layout movement. If art direction requires a square crop on mobile and a wide crop on desktop, the `picture` element can offer sources for those different compositions. Use art direction when the subject would otherwise be lost, not simply to create more files. The Core Web Vitals repair guide explains how image discovery, server response, dimensions, and rendering affect LCP and CLS.
Lazy-load only the images that should wait
Native `loading="lazy"` lets supporting browsers defer eligible offscreen images without a large custom script. Do not add it blindly to every image. Web.dev specifically warns about lazy-loading images visible in the first viewport because it can harm LCP. Avoid a JavaScript implementation that hides image URLs in nonstandard attributes until scroll if the browser and crawler cannot discover them reliably. Reserve space for every deferred image so it does not push content when it appears.

One content image can have several delivery candidates while preserving the same purpose and accessible description.
Write alt text for accessibility first
Alternative text exists so people who cannot see an image can receive its purpose or meaning. That accessibility job comes first. Google can also use alt text and surrounding content to understand an image, but turning the attribute into a keyword list makes the experience worse and can look spammy. The correct text depends on context. The same headshot could be informative on a staff page, functional when it is the only content inside a profile link, or decorative beside a written name and biography. W3C’s alt decision tree starts with what the image does on that page, not with search volume.
Alt decisions by image purpose
| Purpose | Alt approach | Example |
|---|---|---|
| Informative | Convey the essential meaning briefly | Copper flashing installed where the brick chimney meets the roof |
| Functional link or button | Name the destination or action when surrounding text does not | View the Oak Street kitchen renovation |
| Decorative | Use an empty alt attribute so assistive technology can skip it | A texture behind a heading that adds no information |
| Complex chart or diagram | Give a concise alt and provide the full data or explanation nearby | Monthly lead trend; detailed values follow in the table |
| Image of text | Avoid when real text can do the job; otherwise convey the necessary words | A scanned historical notice whose text is transcribed below |
Complex evidence belongs in real page content too. A chart should have its conclusion and underlying values available as text or a table. A floor plan may need a nearby detailed description. A screenshot tutorial should explain the control and step outside the pixels so users can search, zoom, translate, copy, and hear the information. This makes the page stronger even if the image fails to load and gives search systems more dependable context than an overloaded alt attribute.
Add search context without keyword theater
- Use a stable descriptive filename such as `standing-seam-roof-valley.webp` rather than `IMG_8842.webp`
- Keep filenames concise and do not rename the same asset repeatedly to chase phrases
- Place the image near the heading and copy that explain its subject
- Use a visible caption when the source, date, location, person, or result needs clarification
- Give the image a crawlable URL and avoid blocking important image paths in robots.txt
- Preserve consistent URLs when practical so routine edits do not create needless duplicates
- Use applicable image metadata or structured data only when the visible page and asset support it
- Consider an image sitemap when important images are numerous or hard for normal crawling to discover
An image sitemap can provide image information for pages Google already knows, and it may help discovery of assets reached through JavaScript or complex galleries. It is not necessary for every five-page brochure site and is not an indexing guarantee. First make sure the pages and image URLs are accessible, internally linked, and useful. An image CDN is compatible with search when URLs are stable, crawlable, and correctly referenced; verify the CDN host in Search Console if you need its crawl-error data and follow Google’s current image guidance.
Use a repeatable publishing checklist
From camera roll to production page
Confirm value and rights
State what customer question the image answers, who owns it, what release or license applies, and whether personal or sensitive information must be removed.
Crop and export
Create the compositions and width candidates the layouts need. Compare format and quality visually, retain a master, and use a stable descriptive filename.
Implement responsive markup
Set `src`, useful `srcset` candidates, an accurate `sizes` rule, intrinsic dimensions, and art direction only where the subject requires it.
Set priority
Keep initial hero or LCP imagery discoverable and eager. Apply native lazy loading to suitable offscreen images and reserve their layout space.
Add accessible meaning
Choose informative, functional, decorative, or complex-image treatment. Write context-specific alt text and add captions or long explanations where needed.
Test and maintain
Check several viewport sizes, keyboard and screen-reader behavior, broken requests, selected candidates, visual quality, LCP, CLS, and content-management edits.
Set maximum upload dimensions and quality defaults in the content system, but leave a review path for diagrams, product detail, and print-quality downloads that need different treatment. Re-audit when a theme, gallery, CDN, or media plugin changes. Web Respawn’s website care plans can include performance and content-system checks, while the SEO, GEO, and AI search hub shows how images fit within a complete discovery strategy.
If the business lacks original visual evidence, the copywriter or photographer guide helps scope the right contributor before launch. Image optimization can improve delivery, but it cannot manufacture credible project, team, product, or process proof.
What is the best image format for SEO?
There is no single SEO format. Choose a widely supported format that preserves the needed quality at an efficient size, then implement responsive delivery, dimensions, useful context, and accessible alternatives. AVIF and WebP are often strong photo options; SVG suits trustworthy vector art.
Should alt text include keywords?
Alt text should first communicate the image’s purpose to people who cannot see it. Use natural words that accurately describe that purpose in context. Do not add a list of search phrases, locations, or services that the image does not convey.
Should decorative images have no alt attribute?
Decorative `img` elements should normally have an empty alt attribute, written `alt=""`, so assistive technology can skip them. Omitting the attribute entirely may cause a screen reader to announce the filename.
Should every image use lazy loading?
No. Do not lazy-load the likely above-the-fold LCP image. Native lazy loading is useful for eligible offscreen images when dimensions reserve their space and the implementation remains crawlable.
Do filenames make images rank?
A descriptive filename can offer a small piece of context, but it does not make an image rank by itself. Image quality, page relevance, surrounding text, alt treatment, crawlability, and the usefulness of the page matter more.
Evidence behind the guide
Sources and further reading
- Google Images SEO best practicesGoogle Search Central
- Images tutorialW3C Web Accessibility Initiative
- Alt decision treeW3C Web Accessibility Initiative
- Responsive imagesweb.dev
- Image performanceweb.dev
- Browser-level image lazy loadingweb.dev
- Choose the right image formatweb.dev
Continue on Web Respawn
Pages that actually connect to this decision.
These links are selected for the subject of this guide. They are not a generic service dump.
Keep hosting, monitoring, updates and technical responsibility defined after launch.
Open page ↗RELEVANT PAGEWebsite Design FAQsGet concise answers about scope, timelines, ownership, SEO and care.
Open page ↗RELEVANT PAGEWebsite Design & RedesignExplore the strategy, content, design, build and launch foundation.
Open page ↗







