Show Product Thumbnails in the WooCommerce Cart on Mobile

Quick Summary

  • CSS inside a 767px media query brings back the product thumbnail that WooCommerce hides in its stacked mobile cart layout.
  • The td.product-thumbnail cell is set back to display block, its stacked-layout label is hidden, and the image is fixed at 45 pixels wide.
  • Add it to your child theme's style.css or Additional CSS, and change 767px if your theme switches layouts at another width.

On phones, the WooCommerce cart table switches to a stacked layout and hides the cart thumbnails, so customers only see product names. This CSS brings the thumbnail back on the cart page for screens up to 767 pixels wide, and gives the coupon field a little more room.

Add it to your theme’s responsive CSS, your child theme’s style.css or the Customizer’s Additional CSS panel. The rules are already inside a media query, so they only apply on small screens.

CSS
@media only screen and (max-width: 767px) {

/*CART THUMBNAIL FIX*/

	.woocommerce-cart input#coupon_code {
	    min-width: 50% !important;
	    margin-bottom: 2%;
	}

	.woocommerce-cart td.product-thumbnail {
	    display: block !important;
	}
	
	.woocommerce-cart td.product-thumbnail:before {
	    display: none;
	}

	.woocommerce-cart td.product-thumbnail a img {
	    display: block;
	    width: 45px !important;
	}

}

How it works

  • .woocommerce-cart is a body class WooCommerce adds on the cart page, so the rules don’t affect other pages.
  • td.product-thumbnail is set back to display: block. The !important overrides the styles that hide it.
  • The :before rule hides the label that the stacked layout places in front of each cell.
  • The image is fixed at 45 pixels wide; change the width to suit your design.
  • The first rule makes the coupon code input at least half the row wide and adds a small gap below it.

If your theme switches to its mobile layout at a different width, change 767px to match.

For a cart that works well on phones from the start, see my WooCommerce development services.

Share on X (opens in a new tab) Share on LinkedIn (opens in a new tab) Share on Facebook (opens in a new tab)

ChatGPT (opens in a new tab) Claude (opens in a new tab) Gemini (opens in a new tab) Perplexity (opens in a new tab) Grok (opens in a new tab)

More Insights

See More