Product Image
(BU)Product Image displays the current WooCommerce product's featured image. Use it in a single-product template or in each card of a Bricks product query loop. You can link the image to the product page, show an alternate view on hover, or let shoppers browse a gallery slider directly from the card.
Add the Element
- Open a single-product template in Bricks, or open the shop or archive template that contains your product query loop.
- Search for (BU)Product Image and add it where the image should appear. In a query loop, place it inside the repeated product card so it uses each item's product context.
- Set the image resolution and framing. On a product card, enable Link to post so shoppers can open the product page. Leave it off if the card already has a link around the image to avoid nested links.
- Save the template and check it on the storefront with a product that has real images. In a single-product template, use a representative WooCommerce product as the Bricks preview.
Image Size and Framing
- Thumbnail resolution: Select a registered WordPress image size. The default is
woocommerce_thumbnail, a good starting point for product grids. For a larger product detail image, choose a larger registered size and check its sharpness on the storefront. - Aspect ratio: Enter a CSS ratio such as
1 / 1for square cards or4 / 5for portrait images. Apply the same ratio across a grid for consistent framing. - Object fit: Use Cover to fill the image area, cropping excess edges when needed. Use Contain when the entire product needs to stay visible.
- Object position: With a cropped image, choose which part stays in view. Try
center centerfor a centered subject orcenter topto preserve the upper part. - Link to post: Links the image to the product page. This is a product-page link, not an image lightbox.
Enable Lazy Loading
Turn on Enable lazy loading to add loading="lazy" and decoding="async" to images rendered by the element, including the featured image, hover image, and slider images. The browser decides when to fetch lazy images as they approach the viewport.
Enable it for images further down the page. For a prominent product image that is visible on page load, leave it off and check how quickly the image appears. Turning the setting off stops the element from explicitly adding those attributes; WordPress or another optimization plugin may still add its own loading attributes.
Show Gallery Images
Enable Show gallery images, then pick an Effect. If the product has no gallery images, the element shows the main image on its own.
- Image on hover: Fades to the first gallery image when the pointer enters the image. Use this for an alternate angle or a detail shot.
- Flip: Flips between the featured image and the first gallery image. Reorder the product's gallery in WooCommerce to choose which image appears on the back.
- Slider: Shows the featured image first, followed by the gallery images. For variable products with a gallery, the slider also includes available variation image attachments from the product's variations. Duplicate attachments are shown only once.
Hover the Whole Product Card
- In Bricks, add a class such as
product-cardto the repeated container around the image and the rest of the card. - On the Product Image element, explicitly select Image on hover. Enter
.product-cardin Container selector. Leave it empty to keep hover on the image itself. - Use Initial scale and Hover scale to set the size of the alternate image before and during hover. For example, start at
1and try1.05on hover for a subtle zoom. Use Transition to adjust the CSS animation timing.
Touchscreens do not have a reliable hover state. For images shoppers need to inspect on a phone, use Slider with visible arrows or pagination.
Configure the Slider
With the Slider effect selected, the element uses Bricks' Splide integration and displays one image at a time.
- Slider Options: Choose Slide, Loop, or Fade. Set the direction and keyboard options for your layout. Speed in ms controls the transition time. The Autoplay toggle is available with Loop; autoplay pauses on hover and focus. Check playback on the storefront because autoplay is disabled in the builder.
- Slides limit: Counts the featured image as the first slide. Enter
3for up to three images in total, or leave it empty or set it to0to show them all. A limit can leave out variation images added after the gallery images. - Arrows: Enable Show for previous and next controls. Adjust their dimensions, colors, borders, and disabled-state appearance. Use the default icons or set both custom icons; setting only one can leave shoppers without a full pair of controls. Keep the arrows visible on touch layouts.
- Pagination: Enable Show for slide indicators. Adjust their margin and position, then style the default and active indicators separately so shoppers can tell which image is selected.
Switch the Image with Variation Swatches
To replace one featured image when a shopper selects a variation, use a single-image layout with Show gallery images turned off.
- In Product data → Variations, assign an image to the variations that need their own photo and save the product.
- Give the Product Image element a dedicated class, such as
variation-product-image. - In the Add to Cart element's BricksUltimate Swatches settings, enter
.variation-product-imagein (BU)Product Image element selector. The selector targets the element wrapper, not theimgtag. Use a class specific to the image you intend to update. - On the storefront, select all required variation attributes. Verify the correct image appears, then clear the selection and verify the original image returns.
For BricksUltimate swatches in a product query loop, the slider can move to a matching variation image already present in the card's slider. Keep that image within Slides limit. Avoid pointing the featured-image replacement selector at a whole slider or multiple product cards, since it can replace more than one image.
Troubleshooting
- No product image appears: Check that the element is enabled, the template is displaying a WooCommerce product, and that product has a featured image. If no image is assigned, the element tries the configured WooCommerce placeholder and can render nothing if no usable attachment is configured.
- The same image appears in every card: Check that the element sits inside the repeated product card and that the Bricks query loops over products.
- The hover effect or slider is missing: Check that Show gallery images is enabled and the product has at least one gallery image. For a card-wide hover effect, verify the wrapper has the exact class in Container selector.
- The variation image does not change: Confirm the selected variation has an image, the swatches resolve a complete variation, and the selector matches the intended image wrapper. For a loop slider, also check that the variation image was not excluded by the slide limit.
- The image is blurry, cropped, or slow to appear: Check the selected resolution against the rendered size, choose Contain to avoid cropping, and inspect the storefront image in browser developer tools to confirm its loading attributes. Set descriptive alt text in the WordPress Media Library for informative product photos.