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.
- Image set in CSSbackground-image: url(product.jpg)
- Google crawls pageSees an empty div, no img element
- Image indexPhoto not added, no alt text read
- 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
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 abackground-imagestyle, it is a CSS background.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.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.
Check for image results
Search
site:yourdomain.comin Google Images. Key photos missing from the results are candidates to fix, though other issues can also cause this.
[...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.
<div class="hero" style="background-image:url('/img/team.jpg')">
<h1>Meet the team</h1>
</div><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>.hero { position: relative; }
.hero img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: -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.
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.
Edit the theme section
In Online Store > Themes > Edit code, find the section file using
background-imageand replace it with an<img>using the Liquidimage_urlandimage_tagfilters.Add alt text
Set alt text on the product or file in Admin so it carries through to the img tag.
Replace the background with an Image element
Add an Image element from the Add panel, set Alt text in Element Settings, then position it with the Style panel (position absolute, object-fit cover).
Use an image element for key pictures
Strip and section backgrounds in Wix are design backgrounds. Add an Image from the Add panel, then use Settings to set alt text.
Add an Image block
Section background images are decorative. For images that matter, add an Image block and set the alt text in the block's Design/Content settings (menu names vary by version).
Swap to img or picture
Use the HTML and CSS above. Use
<picture>withsrcsetif you serve several sizes or formats.
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
- 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.comin Google Images
How to prevent it happening again
- 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.