Skip to main content

Image group

The image group component displays up to four images in a grid or stacked layout. Use image group to showcase collections of related images, such as products in a wishlist or subscription. The images display as a grid when used within a section component.

When there are more than four images, the component indicates how many additional images aren't displayed, giving customers a clear sense of the full collection size.

Image group displays a maximum of four images. Additional images are represented by a count indicator rather than being shown. All images in the group share the same display size — individual sizing or aspect ratio overrides aren't supported.

Support
Targets (24)

Configure the following properties on the image group component.

string

A unique identifier for the element. Use this to target the element with CSS, JavaScript, or accessibility attributes. The id must be unique within the document.

Anchor to totalItems
totalItems
number

The total number of items that the image group represents. When this value exceeds the number of visible images, the component displays a badge showing the remaining count (for example, "+3"), indicating there are more images than currently displayed.


Anchor to Display an image groupDisplay an image group

Show a collection of related images in a compact layout. This example displays four product images in the default arrangement.

Display an image group

Four plant and garden images in a 2x2 grid: golden pothos, watering can, fiddle leaf fig, and fern.

html

<s-image-group>
<s-image
src="https://cdn.shopify.com/static/sample-product/House-Plant1.png"
alt="Golden pothos in a speckled concrete pot"
></s-image>
<s-image
src="https://cdn.shopify.com/static/images/polaris/thumbnail-wc_src.jpg"
alt="Black metal watering can"
></s-image>
<s-image
src="https://cdn.shopify.com/static/sample-product/House-Plant1.png"
alt="Fiddle leaf fig in a gray ceramic pot"
></s-image>
<s-image
src="https://cdn.shopify.com/static/images/polaris/thumbnail-wc_src.jpg"
alt="Fern in a speckled stone pot"
></s-image>
</s-image-group>

Anchor to Display subscription itemsDisplay subscription items

Show subscription items with delivery details. This example places an image group inside a section alongside the next delivery date and pricing information.

html

<s-section>
<s-heading>Monthly subscription</s-heading>
<s-stack gap="base">
<s-image-group>
<s-image
src="https://cdn.shopify.com/static/sample-product/House-Plant1.png"
alt="Indoor plant"
></s-image>
<s-image
src="https://cdn.shopify.com/static/images/polaris/thumbnail-wc_src.jpg"
alt="White sneakers"
></s-image>
</s-image-group>
<s-stack gap="small">
<s-text>Next delivery: April 15, 2026</s-text>
<s-text color="subdued">2 items · $45.00/month</s-text>
</s-stack>
</s-stack>
</s-section>

  • Write concise alt text for each image: Describe what's important about each image so all customers can understand the content, even when using assistive technologies.
  • Optimize performance: Compress images and use modern formats like WebP. Consider lazy loading to reduce initial load times, especially when displaying multiple groups on a page.
  • Preserve visual breathing room: Maintain consistent spacing around the group so images don't feel crowded or overwhelming within the layout.
  • Use consistent image dimensions: Provide images with similar aspect ratios to maintain a clean, uniform grid appearance.

Was this page helpful?