Skip to content
FunnelGuard

Fix guide by FunnelsGuard

CSS background images not indexed: how to find and fix it

SEO-203Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

There are two ways to show a picture on a web page. An `<img>` tag puts the image in the page content, with an address (src) and a text description (alt). A CSS background sets the picture through a style rule, such as background-image: url(hero.jpg), so the picture belongs to the design, not the content.

Why it costs you leads or sales

The impact is usually modest, which is why this is rated low. But it adds up for businesses that get traffic from pictures: shops, restaurants, property, portfolios and galleries. If your product photos are backgrounds, they will not show in Google Images or in visual results, and Google has no alt text to understand them.

How a background image drops out of search
  1. Image set in CSSbackground-image: url(product.jpg)
  2. Google crawls pageSees an empty div, no img element
  3. Image indexPhoto not added, no alt text read
  4. Image search trafficNo visits from picture results

The image is shown to visitors but never reaches the image index.

How to check if your site has it

Find background images that should be real images
  1. Look at the page in your browser

    Right-click an image you care about and choose Inspect. If you see an <img> tag, it is fine. If you see a <div> or <section> with a background-image style, it is a CSS background.

  2. Search the source for background-image

    Open View Source (Ctrl+U or Cmd+Option+U) and search for background-image. Also check your theme or page builder stylesheet.

  3. Test with Google Search Console

    Use URL Inspection, then View crawled page, and look at the HTML. If the image URL only appears inside a style, Google is treating it as a background.

  4. Check for image results

    Search site:yourdomain.com in Google Images. Key photos missing from the results are candidates to fix, though other issues can also cause this.

Console snippet: list elements using background imagesjavascript
[...document.querySelectorAll('*')].forEach(el => {
  const bg = getComputedStyle(el).backgroundImage;
  if (bg && bg !== 'none' && bg.includes('url(')) {
    console.log(el.tagName, el.className, bg);
  }
});

Paste this into the browser console (DevTools, Console tab) on the page. It prints every element with a URL-based background so you can decide which are content and which are decoration.

How to fix it

The fix is the same everywhere: replace the CSS background with an <img> tag, give it descriptive alt text, and use CSS to keep the same look. The exact menu depends on your platform and theme.

Before: image only in CSShtml
<div class="hero" style="background-image:url('/img/team.jpg')">
  <h1>Meet the team</h1>
</div>
After: real image, same lookhtml
<div class="hero">
  <img src="/img/team.jpg" alt="Five members of our support team at the office" width="1600" height="700">
  <h1>Meet the team</h1>
</div>
CSS to keep the cover effectcss
.hero { position: relative; }
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
Fix by platform
  1. Use an Image block

    In the block editor, add an Image block and fill in Alt text in the sidebar. For a banner with text over it, the Cover block outputs an img element in recent WordPress versions when you set the image as content; check the page source to confirm.

  2. Check your page builder

    In Elementor, Divi and similar builders, a section background is a CSS background. Add an Image widget or module instead for any image that matters.

Background vs img tag

CSS background

  • No alt text possible
  • Usually not indexed for image search
  • Skipped by screen readers
  • Not a content element in the HTML

img tag

  • Alt text describes the picture
  • Eligible for image indexing
  • Read by screen readers
  • Supports srcset, width and height

How to confirm it's fixed

Confirmation checklist
  • Inspect the image in DevTools and see an <img> element with alt text
  • Run URL Inspection in Search Console and see the image in the crawled HTML
  • Run the console snippet again and confirm only decorative backgrounds remain
  • Check the layout on mobile and desktop to be sure the look did not change
  • Allow a few weeks, then search site:yourdomain.com in Google Images

How to prevent it happening again

Habits that keep images indexable
  • Rule of thumb: if the image has meaning, use img; if it is decoration, use CSS
  • Add an alt text check to your publishing checklist
  • Brief designers and developers on this rule before building templates
  • Be careful with page builder sections that default to background images
  • Re-run the console snippet after theme or builder changes

How FunnelGuard handles this

FunnelGuard does not check this yet. Spotting CSS background images that should be real images is a possible future check, not a current feature.

What FunnelGuard does today sits nearby: a robot visitor runs your real customer journeys (lead forms, checkouts, booking and chat buttons) on a schedule and checks each step, the tracking hits and whether test leads arrive. That protects the paths that turn visits into leads, but it does not audit how your images are coded.

Questions people ask

Does Google index CSS background images?

Generally no. Google's guidance says it indexes images in HTML elements such as img and picture, and that images referenced only in CSS are not indexed. Use an img tag for any image you want to appear in Google Images.

Can I add alt text to a CSS background image?

No, CSS backgrounds have no alt attribute. You can add role="img" and aria-label to the element for accessibility, but this does not make the image indexable. Use an img tag with alt text for search.

Why are my product photos not showing in Google Images?

One possible cause is that they are set as CSS backgrounds, often by a theme or page builder. Other causes include blocked crawling, broken URLs or low-quality pages. Inspect the image in DevTools: if there is no img tag, switch to one.

How do I keep the same design when I switch from background-image to img?

Put the img inside the container and style it with object-fit: cover, width: 100% and height: 100%. Set the container to position relative and the image to absolute. This reproduces the cover background look.

Is it bad to use background images for a hero banner?

It is fine for decoration, but not ideal if the image shows something meaningful. A real img tag gives you alt text, srcset and better accessibility. It also makes it easier to avoid lazy loading the main image.

How do I find background images on my website?

Inspect elements in DevTools and look for background-image in the Styles panel, or paste a short console script that lists elements with a computed background image. An SEO crawler can also help.

Does FunnelGuard check for CSS background images?

No. FunnelGuard does not check this yet; it is a possible future check. It monitors journeys, tracking hits and test leads instead.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.