Skip to content

[00] Subset Sizes, User guide

WooCommerce

Last updated

How Subset Sizes Pro keeps WooCommerce product images on demand, what it switches off in WooCommerce, and what the free plugin does on its own.

Subset Sizes makes WooCommerce’s product image sizes on demand, like any other registered size. The WooCommerce integration is part of Subset Sizes Pro and runs on a site with an active licence. It stops WooCommerce remaking every product image itself, which would undo Lazy sizes.

What works

WooCommerce registers three sizes: woocommerce_thumbnail, woocommerce_single and woocommerce_gallery_thumbnail. With the free plugin, they’re made on demand from the dimensions WooCommerce currently has, and you can tick any of them under Create at upload on Subset → Image Sizes.

Pro adds:

  • No background regeneration. WooCommerce normally resizes every product image in the background after you publish its image settings in the Customizer or switch themes (WooCommerce’s regeneration docs (opens in a new tab)). Pro turns that off. Subset Sizes already works from the current settings, and each size is remade the first time a page asks for it.
  • No resizing while a product page renders. WooCommerce also resizes an image on the spot when a size on the page doesn’t match its settings. Pro turns that off too, so sizes are only made by Subset Sizes, one request at a time per image.
  • Hard-cropped gallery thumbnails. WooCommerce asks for gallery thumbnails by width and height, which WordPress treats as a soft crop, so a 4:3 photo would get a shorter thumbnail than a square one. Pro asks for the named woocommerce_gallery_thumbnail size instead, which keeps every thumbnail in the strip the same height.
  • Customizer previews. While you change sizes under Appearance → Customize → WooCommerce → Product Images, the preview uses the new dimensions. Sizes the preview needs are made while it renders, and sizes that don’t exist yet are left out of srcset.

Zoom and the lightbox use the full-size image, which always exists, so they need nothing from either plugin.

What needs a setting

Nothing, beyond an active Subset Sizes Pro licence. The integration turns itself on when WooCommerce is active.

To make a product size at upload instead of on first view, tick it under Create at upload on Subset → Image Sizes. This is useful for woocommerce_thumbnail on a shop with many products, so category pages don’t make thumbnails for the first visitor.

Known limits

  • Without Pro, WooCommerce’s own regeneration still runs. After you change product image settings or switch themes, WooCommerce makes every size for every product image in the background. Your pages keep working, but the files Lazy sizes saved are created anyway.
  • Block themes set product image sizes elsewhere. The Customizer preview support only applies to themes that use Appearance → Customize.