Image SEO in 8 steps: use real img tags (Google does not index CSS background images); write short, specific alt text (Google calls it the most important image attribute); use descriptive file names; serve WebP or AVIF (WebP is 25 to 34% smaller than JPEG per Google); set width and height and use srcset; lazy-load images below the fold but never the top (LCP) image; place images near related text with a caption; and add an image sitemap or structured data only if you need them.
Most image SEO advice stops at “add alt text”. That is the right start, but it misses the reason most image-heavy pages are slow: huge files, missing sizes and lazy-loading the wrong image. So I read Google’s image SEO best practices, its WebP page and the web.dev guides on lazy loading and LCP on 3 Dec 2026.
Then I opened one of our own posts, how to buy expired domains, and printed the real code of its images on the page so you can see each rule in use, including one place where we could do better.
On this page17 sections
Image SEO checklist at a glance
| Step | What to do | What Google or web.dev says |
|---|---|---|
| 1. Use img tags | Put images in <img src>, not CSS backgrounds | Google doesn’t index CSS images |
| 2. Alt text | Describe the image in context | The most important attribute for image metadata |
| 3. File name | Short, descriptive words with hyphens | Gives Google very light clues |
| 4. Format | WebP or AVIF; JPEG or PNG fallback | Supported: BMP, GIF, JPEG, PNG, WebP, SVG, AVIF |
| 5. Size and srcset | Right pixel size; several sizes for screens | Set width and height to avoid layout shifts |
| 6. Lazy loading | Lazy below the fold only | Never lazy-load the LCP image |
| 7. Placement and captions | Near the text it explains | Google reads captions and nearby text |
| 8. Sitemap and markup | Image sitemap, og:image, structured data where useful | Helps discovery and preferred image choice |
Read 3 Dec 2026.
1. Use real img tags, not CSS backgrounds
Google’s image SEO page says Google can find images in the src attribute of an <img> element, even inside a <picture> element, and that it does not index CSS images. So a product photo set as a CSS background will not show in Google Images.

Good: <img src="eggless-chocolate-cake.webp" alt="Eggless chocolate cake with ganache, 1 kg">
Bad: <div style="background-image:url(cake.webp)">Our cake</div>
2. Write useful alt text
Alt text is a short description in the image’s code. Screen readers read it aloud, browsers show it when the image fails, and Google uses it with computer vision and the page text to understand the image. Google also says alt text acts as anchor text when an image is a link.

| Alt text | Verdict |
|---|---|
| (missing) | Bad: screen readers and Google get nothing |
| “cake” | Weak: too vague |
| “cake, best cake, cake shop Pune, cheap cake, birthday cake” | Bad: keyword stuffing, which Google says may look like spam |
| “Eggless chocolate cake with ganache and berries, 1 kg” | Good: specific and in context |
Read 3 Dec 2026.
Here is a real image on our expired domains guide, with its code printed below it:

- Alt text: “ICANN’s official life cycle chart of a typical gTLD domain name, read 3 Dec 2026”. It says what the image is and where it came from.
- Decorative images (dividers, background shapes) can have an empty alt=”” so screen readers skip them.
- Indian languages: if the page is in Hindi or Marathi, write the alt text in that language too.
3. Name your files with real words
Google says the file name gives it “very light clues” about the image, and gives this example: my-new-black-kitten.jpg is better than IMG00023.JPG. Avoid generic names like image1.jpg or pic.gif.

Honest note: our own example above is called ed-icann.webp. It is short and better than IMG_0023, but icann-domain-life-cycle.webp would say more. Rename files before you upload; changing the name later changes the image URL.
- Lowercase, words separated by hyphens.
- Describe the subject, not the camera: red-cotton-kurta-front.webp.
- Match the extension to the real format (.webp for WebP). Google says this is a good idea.
4. Pick a modern format: WebP or AVIF
Google Search supports images in the src attribute in BMP, GIF, JPEG, PNG, WebP, SVG and AVIF.

For speed, Google’s WebP page gives the numbers: lossless WebP images are 26% smaller than PNGs, and lossy WebP images are 25 to 34% smaller than comparable JPEGs at the same quality index. WebP also supports transparency and animation.

| Format | Use it for | Note |
|---|---|---|
| WebP | Most photos and screenshots | Good default today |
| AVIF | Photos where you want even smaller files | Supported by Google Search |
| JPEG | Photos, as a fallback | Compress before upload |
| PNG | Logos and graphics that need sharp edges | Large for photos |
| SVG | Icons and logos | Tiny, sharp at any size |
| GIF | Simple animation | Animated WebP is usually smaller |
Read 3 Dec 2026.
5. Set the size, and give phones smaller files
web.dev’s lazy loading guide recommends adding width and height to every img so the browser can reserve space and the page does not jump while images load (a layout shift). The srcset attribute lists several sizes of the same image so a phone can download a smaller one.

Our image is 1,330 by 889 pixels, the width and height are in the code, and WordPress made 5 sizes in srcset. Google’s page also asks you to keep a normal src as a fallback, because some browsers and crawlers do not understand srcset or picture.
<img src="cake-1200.webp"
srcset="cake-480.webp 480w, cake-800.webp 800w, cake-1200.webp 1200w"
sizes="(max-width: 600px) 480px, 800px"
width="1200" height="800" alt="Eggless chocolate cake with ganache, 1 kg">
6. Lazy-load the right images (not the top one)
Lazy loading means an image loads only when the reader scrolls near it. WordPress has done this by default since version 5.5, adding loading=”lazy” to images that have width and height. It saves data, which matters on Indian mobile plans.
But there is a trap. The biggest image near the top of the page is often the page’s Largest Contentful Paint (LCP) element, a Core Web Vital. web.dev’s LCP guide warns:

Here is how our site handles it. The logo at the very top has no loading=”lazy” and has fetchpriority=”high”, which tells the browser to fetch it early. Images further down are lazy.

- Below the fold: loading=”lazy”.
- Top hero or featured image: no lazy loading; consider fetchpriority=”high”.
- Check in PageSpeed Insights which element is your LCP.
7. Place images near the text they explain
Google says it extracts information about an image from the page, including captions and image titles, and asks you to place images near relevant text, on pages relevant to the image. A screenshot of a pricing table belongs right next to the paragraph about prices, with a caption that says what it shows.
- Use a caption when it adds information (date, source, what to notice).
- Do not put important text only inside an image. Write it in the page too.
- Use your own photos where you can. Stock photos appear on many sites.
8. Image sitemaps, preferred image and structured data
Google says an image sitemap helps it find images it might not otherwise discover, and that image sitemaps can list URLs on other domains, which helps if you use a CDN. Many WordPress SEO plugins can list images in your sitemap.
To suggest which image Google shows as a page’s preview (for example in Discover), Google lists two ways: the schema.org primaryImageOfPage property, or the og:image meta tag. It asks you not to choose a generic image like your logo, or an image with text, for this.
<meta property="og:image" content="https://example.com/images/eggless-chocolate-cake.webp">
Structured data (Product, Recipe, Video and others) can make your images eligible for rich results and badges in Google Images, if you follow the guidelines for that type.
How to check images on any page in 10 minutes
- Open the page, right-click an image and choose Inspect.
- Check the img tag: is there an alt? Does it describe the image?
- Look at the file name in src. Words or random numbers?
- Check the extension: .webp or .avif is best for photos.
- Look for width, height and srcset.
- Check loading: lazy below the fold, not on the top image.
- Open the Network tab, filter by Img, reload, and sort by size. Anything over a few hundred KB needs compressing.
- Run PageSpeed Insights on mobile and read the image items and the LCP element.
- Search Google Images for site:yourdomain.com to see what is indexed.
Common image SEO mistakes
| Mistake | Why it hurts | Fix |
|---|---|---|
| Uploading phone photos straight from the camera | Files of several MB slow the page | Resize to the width you show and save as WebP |
| Lazy-loading the hero image | Delays LCP, the main loading score | Remove loading=”lazy” from the top image |
| Same alt text on every image | Gives no real information | Describe each image on its own |
| Keyword-stuffed alt text | Google says it may be seen as spam | Write for a person who cannot see the image |
| Text only inside images | Readers and search engines may miss it | Put the words in the page text too |
| Images in CSS backgrounds | Google does not index CSS images | Use img tags for content images |
| No width and height | The page jumps while loading | Let WordPress add them, or add them by hand |
| Blurry or tiny product photos | Google says sharp images appeal more in thumbnails | Use clear, well-lit photos at a good size |
Read 3 Dec 2026.
Image SEO by type of site
- Online shops: several angles per product, alt text with product name, colour and size, Product structured data, and no lazy-loading on the first product photo.
- Recipe and food blogs: a clear final-dish photo near the top, step photos lower down (lazy), and Recipe structured data.
- Guides and tutorials: annotated screenshots next to each step, captions that say what to notice, and descriptive file names.
- Local businesses: real photos of the shop front, team and work, on your site and on your Business Profile.
Red, yellow, green: rate your images
The file size numbers are our own rule of thumb, not a Google limit.
| Check | Green: good | Yellow: improve | Red: fix now |
|---|---|---|---|
| Alt text | Short, describes the image in context | Generic ("image", "photo") | Missing, or a list of keywords |
| File name | Words: eggless-chocolate-cake.webp | Partly useful: ed-icann.webp | IMG_00023.JPG, image1.jpg |
| Format | WebP or AVIF with a fallback if needed | JPEG or PNG, compressed | Huge PNG photos, BMP |
| File size | Under about 100 KB for most content images (our rule of thumb) | 100 to 300 KB | 1 MB or more |
| Dimensions | width and height set; srcset for phones | Size set, no srcset | No size, the page jumps while loading |
| Loading | Below the fold lazy; top image not lazy | Everything eager | The main top image lazy-loaded |
| Placement | Next to the text it explains, with a caption | Far from related text | In CSS backgrounds only, or text inside images only |
WordPress notes
- Add alt text in the image block’s sidebar (Alternative text). Set it in the Media Library too.
- Rename the file on your computer before you upload.
- WordPress creates several sizes and adds srcset, width, height and lazy loading for you.
- Use an image optimization plugin or convert to WebP before upload; test that the plugin keeps a fallback for old browsers.
- Speed matters beyond images. Our WordPress speed guide covers caching and hosting.
India notes
- Data costs and slow networks: many readers are on mobile data. A 2 MB photo can take seconds on a weak signal. Aim small.
- Product photos: Indian shoppers compare with marketplaces. Your own clear photos with good alt text stand out in Google Images.
- Local language: write alt text and captions in the language of the page.
- Festive pages: Diwali or Holi pages often use heavy banners. Compress them and do not lazy-load the top banner.
Related guides: on-page SEO (where images fit with titles and headings), types of SEO and SEO tips.
Frequently asked questions
What is image SEO?
Image SEO means making your images easy for search engines to find and understand, and quick for people to load. It covers alt text, file names, image format and size, responsive images, lazy loading, captions and placement, image sitemaps and structured data.
What is the most important part of image SEO?
Google’s image SEO page says the most important attribute for image metadata is the alt text. Google uses alt text with computer vision and the page content to understand the image. After that come useful placement near related text, descriptive file names and fast loading.
How long should alt text be?
Google’s page does not give a character count. Keep it short and specific: describe what the image shows and why it is on the page, in a sentence or less. Avoid stuffing keywords, which Google says can make your site look like spam.
Is WebP better than JPEG for SEO?
WebP files are usually smaller. Google’s WebP page says lossy WebP images are 25 to 34% smaller than comparable JPEGs and lossless WebP is 26% smaller than PNG. Smaller files load faster. Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF.
Should I lazy-load all images?
No. Lazy-load images further down the page, but never the main image at the top (the LCP image). web.dev warns that lazy-loading the LCP image always delays it and hurts Largest Contentful Paint.
Does WordPress lazy-load images automatically?
Yes. Since WordPress 5.5, images are lazy-loaded by default with the native loading attribute, on img tags that have width and height. Check that your theme does not lazy-load the top image.
Do I need an image sitemap?
Usually not for a normal blog, because Google finds images in your img tags. Google says an image sitemap helps it find images it might not otherwise discover, and it can include image URLs on other domains, such as a CDN.
Can Google read text inside images?
Do not rely on it. Put important text in the HTML, not only inside a picture. Google also advises against generic images or images with text as your preferred page image in og:image or schema markup.
About this page
WordPress developer and designer, builds sites for clients · WordCamp Asia Communication Co-Lead · 14K+ subscribers on the DigitalPritam YouTube channel
How we checked
- Google image SEO best practices, image sitemaps and WebP pages read 3 Dec 2026
- web.dev lazy loading and LCP guides and WordPress 5.5 note read the same day
- Own-page examples print the real img code of a live post on this site
- File-size targets are our rule of thumb, marked as such
How I got these facts
I read Google’s image SEO best practices, image sitemaps page and WebP page, web.dev’s lazy loading and LCP articles and the WordPress 5.5 lazy-loading note on 3 Dec 2026. For the examples, I loaded our own live post and printed each image’s real attributes (file name, format, file size, alt, width, height, loading, srcset, fetchpriority) on the page before taking the screenshot.
Sourcesdevelopers.google.com ×4·web.dev ×2·make.wordpress.orgShow 7
- developers.google.com/search/docs/appearance/google-images
- developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps
- developers.google.com/speed/webp
- web.dev/articles/browser-level-image-lazy-loading
- web.dev/articles/optimize-lcp
- make.wordpress.org/core/2020/07/14/lazy-loading-images-in-5-5
- developers.google.com/search/docs/fundamentals/seo-starter-guide
PDFThe Hostinger setup checklist
12 steps we run on every site, plus an email when a big hosting sale opens.
Free. Unsubscribe in one click.


