--- title: Migrate ImageGroup to the Polaris image group component description: >- Learn how to migrate the ImageGroup component to Polaris web components in customer account UI extensions. source_url: html: >- https://shopify.dev/docs/apps/build/customer-accounts/migrate-to-web-components/image-group md: >- https://shopify.dev/docs/apps/build/customer-accounts/migrate-to-web-components/image-group.md --- # Migrate ImageGroup to the Polaris image group component The Polaris image group component displays up to four images together with an optional count of additional items. It replaces the previous [`ImageGroup`](https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/components/media-and-visuals/imagegroup) component and is available as [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/media-and-visuals/image-group) in API versions 2025-10 and newer. The biggest change is that layout is now context-driven. The previous `ImageGroup` used a `variant` prop to switch between `grid` and `inline-stack`. `` renders as a grid inside a [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section) and as a stacked layout everywhere else. ## Migrating ImageGroup to s-image-group ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Image, ImageGroup, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( ); } ``` *** ## Removed properties ### variant The previous `ImageGroup` `variant` prop has been removed. Layout is now determined by the parent: `` renders as a grid inside a [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/section) and as a stacked layout in other contexts. To get the previous `variant="grid"` layout, wrap `` in an ``. This also applies the section's styles based on the merchant's branding settings. ## Migrating variant=grid to s-section ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Image, ImageGroup, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( ); } ``` ### accessibility​Label The previous `ImageGroup` `accessibilityLabel` prop has been removed. Describe each image with its own `alt` text on the child [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/media-and-visuals/image) elements instead. ### loading The previous `ImageGroup` `loading` prop has been removed. *** ## Further guidance ### Recreating the inline-stack image group layout The previous `ImageGroup` `variant="inline-stack"` rendered images as a compact overlapping horizontal stack, regardless of context. `` renders as a stacked layout outside `` automatically, so you only need this recreation pattern when you want the overlapping look inside an ``, where `` renders as a grid. Compose it yourself with an [``](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/layout-and-structure/grid) that uses overlapping column widths. ## Recreating inline-stack with s-grid ##### Latest (Preact) ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( +3 ); } ``` ##### Pre-Polaris (2025-07) ```jsx import { Image, ImageGroup, reactExtension, } from '@shopify/ui-extensions-react/customer-account'; export default reactExtension( 'customer-account.page.render', () => , ); function Extension() { return ( ); } ``` ***