Skip to main content
A WooCommerce product page cross-sell block showing related product thumbnails with no alt text set
WooCommerce7 min read

WooCommerce Cross-Sell Thumbnails Miss Alt Text

WooCommerce cross-sell and upsell thumbnails often ship with no alt text, because a separate template or widget renders them, not the product gallery.

Cross-sell and upsell thumbnails on a WooCommerce product page are some of the easiest images on a site to miss when you're cleaning up alt text, because they rarely come from the product's own image field. They're pulled in by a separate block — "You may also like", "Customers also bought", a related-products widget, or a cross-sell panel on the cart page — and that block often has its own markup, its own image loader, and sometimes a theme override that drops the alt attribute entirely.

If you've already run an alt text audit on your main product galleries and category thumbnails, treat cross-sell and upsell blocks as a second, separate pass. They look like they should already be covered by whatever fixed the main product images, which is exactly why they get skipped.

Why WooCommerce cross-sell alt text often comes up blank

WooCommerce ships two built-in mechanisms that show other products next to the one a shopper is viewing: cross-sells (shown on the cart page, aimed at complementary items) and upsells (shown on the single product page, aimed at better alternatives). Both pull the featured image of the related product through wc_get_product() and a template file, usually content-product.php or a cart-page cross-sells template.

That sounds like it should just reuse the same alt text as the product's own listing. In practice, three things break it:

  • Theme overrides. Many WooCommerce-compatible themes ship their own version of the cross-sell template, often simplified for layout reasons, and the simplified version sometimes drops the wp_get_attachment_image() call that normally carries the alt attribute across, replacing it with a raw <img src="...">.
  • Caching and lazy-load plugins. Lazy-load scripts that rewrite src into data-src for performance sometimes strip or fail to copy accompanying attributes, alt text included, especially on older or less-maintained plugins.
  • Plugin-added cross-sell widgets. "Frequently bought together", "customers also bought", and similar upsell apps (whether a dedicated plugin or a theme-builder widget) often render their own markup entirely outside WooCommerce's native templates, with no guarantee they read the attachment's alt field at all.

The result is a page where the main product photo has solid alt text, and a few thumbnails just below it have none — invisible in a normal page scan, because visually nothing looks wrong.

Where to actually look

Alt text tools that scan the media library won't catch this, because the problem usually isn't a missing attachment-level alt text value — it's a template or widget failing to output the alt attribute at all, even when the underlying image has one set. You have to check the rendered HTML, not the database field.

Three places to check on a live site:

  1. The single product page, scrolled down to the upsells section (usually labelled "You may also like" or similar).
  2. The cart page, scrolled past the cart table to the cross-sells section, if your theme shows one.
  3. Any third-party "also bought" or "frequently bought together" app, wherever it's placed — these are often added via a shortcode or a block and can appear almost anywhere on the page.

A four-step walkthrough to find and fix it

  1. Open a product page in an incognito window and scroll to the upsells block. Right-click a thumbnail and choose "Inspect" (or your browser's equivalent) to view the actual <img> tag.
  2. Check the alt attribute in the markup, not just whether the image looks fine. An empty alt="" is sometimes intentional and fine (see below); a missing attribute entirely, or one that's visibly a filename like alt="IMG_4821", is the bug you're looking for.
  3. Repeat on the cart page with at least one product that has WooCommerce cross-sells configured, and on any third-party upsell widget your theme or plugins add.
  4. Trace the template. If the attribute is missing, check whether your theme has overridden cart/cross-sells.php or the upsells template under woocommerce/single-product/. Compare it against the WooCommerce core version of the same file (available in the plugin's own templates/ folder) — the difference usually shows exactly where the alt attribute got dropped.

If the gap comes from a third-party cross-sell plugin rather than a theme override, the fix is usually a setting in that plugin (some let you choose whether to reuse the product's native alt text or a custom label) rather than a code change — check its documentation before assuming you need to edit a template.

What "good" alt text looks like for a cross-sell thumbnail

Context changes what counts as correct here more than it does for a main product photo. A cross-sell thumbnail that sits right next to the product's name as visible text — the normal WooCommerce layout — doesn't need the alt text to repeat that name. A redundant alt="Blue Canvas Tote Bag" next to a text link that already says "Blue Canvas Tote Bag" adds nothing for a screen reader user; it's just noise read out twice.

What the alt text should carry instead is anything the image conveys that the text label doesn't: colour or pattern variation if that's the point of showing it (a tote in a different colourway from the one just viewed, say), or a short description if the thumbnail is the only identifying information for an item with a generic product title. If the text label is already the complete, accurate description, a shorter alt text, or even alt="" with role="presentation", is a legitimate and sometimes preferable choice — it tells assistive technology to skip a genuinely redundant image rather than read it twice.

Frequently asked questions

Does fixing cross-sell alt text help SEO, or is it only an accessibility issue?

Both. Google's image search and shopping-related crawling do read alt text on secondary product thumbnails, not just the primary product image, so a cross-sell block full of blank or filename-style alt attributes is still a missed image SEO opportunity on every page that shows it. It's also one of the more common WCAG 1.1.1 findings in WooCommerce store audits, because the images are easy for both humans and automated scanners to overlook.

Why does the same product image have correct alt text on its own page but blank alt text in the cross-sell block?

Because the alt attribute isn't stored once and reused everywhere the image appears — it's output fresh by whatever template renders that particular instance of the image. The product's own page template usually calls wp_get_attachment_image() correctly and reads the alt text from the attachment. A cross-sell or upsell template that's been overridden, simplified, or replaced by a plugin can render the same underlying image with a plain <img src> tag that never looks up the alt field at all, which is why the two placements diverge.

Will a caching plugin or lazy-load plugin ever strip alt text on its own?

It can, though it's less common than a template-level cause. Some aggressive lazy-load implementations rewrite the image markup to defer loading and occasionally drop secondary attributes in the process, particularly on older plugin versions. If you've confirmed the template itself outputs the correct alt attribute (by viewing source with JavaScript disabled, or checking the initial HTML response before any lazy-load script runs) and the alt text still isn't showing up in the rendered DOM, that's a sign to check your lazy-load plugin's settings or update it.

Fixing it at scale

Because these gaps live in templates and third-party widgets rather than individual attachment records, they don't show up the same way a missing alt text field does, and they're easy to reintroduce every time a theme updates. OpptiAI Alt Text scans your WooCommerce store's actual image inventory and flags images missing usable alt text, so you can catch new gaps as they appear rather than re-auditing cross-sell blocks by hand after every theme or plugin update. Take a look at OpptiAI Alt Text or run a free image SEO audit to see where your store currently stands.

O

Benjamin Graham Oats

SEO and accessibility experts building AI-powered WordPress plugins.

·7 min read

Related Posts