coffee4devContact us

Docs C4D Variation Swatches & Gallery for WooCommerce

A photo gallery for each colour

Updated 13 November 2026

WooCommerce lets you set one image per variation. That’s often not enough: a customer who picks “Green” wants to see the green jacket from the front, the back and close up. The plugin lets you add a set of photos to each option, and switches the whole gallery when that option is picked.

Adding photos to an option

  1. Open a variable product in the editor.
  2. Find the Swatch Images box in the right-hand column, usually below Product gallery. It only appears on variable products.
  3. The box lists every option of every attribute, such as Black, Green and Red under Color.
  4. Under an option, click Add product gallery images, select the photos and click Add to gallery.
  5. Drag photos to change their order. The first photo is the one shown first, and is also used as the image swatch.
  6. To remove a photo, hover over it and click the x.
  7. Click Update to save the product.

There’s no limit on the number of photos per option, and every feature of the plugin is free.

Photos are stored per option name on each product, so “Green” on a jacket and “Green” on a scarf have their own photos.

The gallery switches when a customer picks an option of an attribute whose type is Color or Image. Text and drop-down attributes, such as size, don’t change the gallery, which is usually what you want: a medium and a large jacket look the same in photos.

The canvas cap in the demo store has three photos for each colour: pick a colour and the whole gallery changes.

The gallery settings are on the plugin’s own settings page, in two tabs: C4D › Swatches › Product page and C4D › Swatches › Gallery & zoom. The tables show the default of each setting. Settings reference lists every tab.

Product page tab

Setting What it does
Use the plugin gallery Use the plugin’s own gallery instead of the theme’s. Turn it on if your theme’s gallery doesn’t switch or looks broken. Off by default.
Variation gallery Show the gallery of the picked option when the variation changes. On by default.
Main gallery selector The CSS selector of your theme’s gallery, which the plugin gallery replaces. The default, .woocommerce-product-gallery, matches WooCommerce’s standard gallery.
Render position Show the swatches before or after the theme’s default attribute drop-downs. Before by default.
Out of stock options Show sold-out options (with an “Out Of Stock” label) or hide them. Show by default.
Hide clear button Hide the “Clear” link that resets the selection. Off by default.
Small screens On small screens, keep the plugin swatches or go back to the theme’s drop-down. Plugin swatches by default.
Image popup on hover Show a larger photo of an option when a customer hovers over its swatch. Off by default.
Variation image in cart Show the option’s photo in the cart. Off by default.
Setting What it does
Hide gallery arrows Hide the left and right arrows on the main photo. Off by default.
Thumbnail navigation Show thumbnails as a Slider or a Grid. Slider by default.
Show thumbnail navigation Show the row of thumbnails under (or beside) the main photo. On by default.
Hide thumbnail arrows Hide the arrows on the thumbnails. Off by default.
Navigation direction Place thumbnails Horizontal (below the photo) or Vertical (beside it). Horizontal by default.
Thumbnails shown at once How many thumbnails are visible at the same time, from 1 to 6. 3 by default.
Load the WooCommerce zoom library Load WooCommerce’s zoom script, for themes that removed it. Off by default.
Zoom button text The text of the zoom button. + by default.
Zoom and pan Open the photo full screen with a pan and zoom effect. Off by default.
Zoom outside the box Show the zoomed photo in a box to the right of the gallery. It works on screens 768 px wide or more, and not together with Zoom and pan. Off by default.

The Swatch shape setting (circle or rectangle) is in the same tab. It’s covered in the Settings reference.

The gallery’s colours, sizes and spacing are set with CSS, not with settings. See Style swatches with CSS.

Photo tips

  • Use the same size and crop for every option, so the gallery doesn’t jump when a customer switches colours.
  • Put the most representative photo first. It’s the one people see when they compare colours.
  • Keep files small. A gallery of 2,000 px photos for ten colours adds up quickly on mobile. WordPress creates smaller copies, but the source should still be under 300 KB.