Image
The image component embeds images within the interface with control over presentation and loading behavior. Use image to visually illustrate concepts, showcase products, display user content, or support tasks and interactions with visual context.
Images support responsive sizing, alt text for accessibility, aspect ratio control, and loading states for progressive enhancement. For small preview images in lists or tables, use thumbnail. For profile images, use avatar.
Supported targets
- purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Anchor to propertiesProperties
- Anchor to accessibilityRoleaccessibilityRoleaccessibilityRole'img' | 'none' | 'presentation''img' | 'none' | 'presentation'Default: 'img'Default: 'img'
Sets the semantic meaning of the image content. When set, the role will be used by assistive technologies to help users navigate the page.
'img': Identifies the element as an image that conveys meaningful information to users.'none': Completely hides the element and its content from assistive technologies.'presentation': Removes semantic meaning, making the image purely decorative and ignored by screen readers.
- Anchor to altaltaltstringstringDefault: ''Default: ''
Alternative text that describes the image for accessibility.
Provides a text description of the image for users with assistive technology and serves as a fallback when the image fails to load. A well-written description enables people with visual impairments to understand non-text content.
When a screen reader encounters an image, it reads this description aloud. When an image fails to load, this text displays on screen, helping all users understand what content was intended.
Learn more about writing effective alt text and the alt attribute.
- Anchor to aspectRatioaspectRatioaspectRatio`${number}${optionalSpace}/${optionalSpace}${number}` | `${number}``${number}${optionalSpace}/${optionalSpace}${number}` | `${number}`Default: '1/1'Default: '1/1'
The aspect ratio of the image.
The rendering of the image will depend on the
value:: the aspect ratio will be respected and the image will take the necessary space.: the image will not render until it has loaded and the aspect ratio will be ignored.
Learn more about the aspect-ratio property.
- Anchor to borderborderborderBorderShorthandBorderShorthandDefault: 'none' - equivalent to `none base auto`.Default: 'none' - equivalent to `none base auto`.
A shorthand for setting the border around the image. Accepts a size keyword alone (for example,
'base'), a size and color (for example,'base base'), or a size, color, and style (for example,'base base solid'). Use'none'to remove the border.- Anchor to borderRadiusborderRadiusborderRadiusMaybeAllValuesShorthandProperty<Extract<ImageProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>>MaybeAllValuesShorthandProperty<Extract<ImageProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>>Default: 'none'Default: 'none'
The radius of the border corners around the image. You can use a single value to apply the same radius to all corners, or use the 1-to-4-value syntax to control individual corners.
- Anchor to borderStyleborderStyleborderStyleMaybeAllValuesShorthandProperty<BorderStyleKeyword> | ""MaybeAllValuesShorthandProperty<BorderStyleKeyword> | ""Default: '' - meaning no overrideDefault: '' - meaning no override
Controls the visual style of the border on all sides, such as solid, dashed, or dotted.
When set, this overrides the style value specified in the
borderproperty.Supports 1-to-4-value syntax for specifying different styles per side:
- One value: applies to all sides
- Two values: applies to block sides (top/bottom) and inline sides (left/right) respectively
- Three values: applies to block-start (top), inline sides (left/right), and block-end (bottom) respectively
- Four values: applies to block-start (top), inline-end (right), block-end (bottom), and inline-start (left) respectively
- Anchor to borderWidthborderWidthborderWidthMaybeAllValuesShorthandProperty<ReducedBorderSizeKeyword> | ''MaybeAllValuesShorthandProperty<ReducedBorderSizeKeyword> | ''Default: '' - meaning no overrideDefault: '' - meaning no override
The width of the border around the image. You can use a single value to apply the same width to all sides, or use the 1-to-4-value syntax to control individual sides. When set, this overrides the width value specified in the
bordershorthand.- Anchor to idididstringstring
A unique identifier for the element. Use this to reference the element in JavaScript, link labels to form controls, or target specific elements for styling or scripting.
- Anchor to inlineSizeinlineSizeinlineSize'fill' | 'auto''fill' | 'auto'Default: 'fill'Default: 'fill'
The inline width (horizontal size) of the image.
'fill': The image takes up 100% of the available inline space.'auto': The image is displayed at its natural size.
Learn more about the width attribute.
- Anchor to loadingloadingloading'eager' | 'lazy''eager' | 'lazy'Default: 'eager'Default: 'eager'
Determines the loading behavior of the image:
'eager': Immediately loads the image, irrespective of its position within the visible viewport.'lazy': Delays loading the image until it approaches a specified distance from the viewport.
Learn more about the loading attribute.
- Anchor to objectFitobjectFitobjectFit'contain' | 'cover''contain' | 'cover'Default: 'contain'Default: 'contain'
How the image should be resized to fit its container. The image is positioned in the center of the container. Learn more about the object-fit property.
'contain': Fits the entire image within the container, preserving aspect ratio. May leave empty space.'cover': Fills the container while preserving aspect ratio, cropping the image if needed.
- Anchor to sizessizessizesstringstring
A set of media conditions and their corresponding sizes. Learn more about the sizes attribute.
- Anchor to srcsrcsrcstringstring
The image source (either a remote URL or a local file resource).
When the image is loading or no
srcis provided, a placeholder is rendered. Learn more about the src attribute.- Anchor to srcSetsrcSetsrcSetstringstring
A set of image sources and their width or pixel density descriptors. Learn more about the srcset attribute. This overrides the
srcproperty.
BorderShorthand
A shorthand string for specifying border properties on the image component. Supports size alone, size with color, or size with color and style — following the pattern `'size'`, `'size color'`, or `'size color style'`.
ReducedBorderSizeKeyword | `${ReducedBorderSizeKeyword} ${ReducedColorKeyword}` | `${ReducedBorderSizeKeyword} ${ReducedColorKeyword} ${BorderStyleKeyword}`ReducedBorderSizeKeyword
The subset of border size values available for the image component. These control the thickness of any border applied around the image. - `base`: Standard border width. - `large`: Thick border for strong emphasis. - `large-100`: Extra thick border for maximum prominence. - `large-200`: The thickest available border. - `none`: No border.
'large' | 'base' | 'large-100' | 'large-200' | 'none'ReducedColorKeyword
The subset of border color values available for the image component. - `base`: The standard border color for most contexts.
'base'BorderStyleKeyword
The visual style of a border. Learn more about [border-style](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style). - `none`: No border is rendered. - `solid`: A single continuous line. - `dashed`: A series of short dashes. - `dotted`: A series of round dots. - `auto`: The border style is determined automatically based on the surface's design system.
"none" | "solid" | "dashed" | "dotted" | "auto"MaybeAllValuesShorthandProperty
Represents CSS shorthand properties that accept one to four values, following the [CSS shorthand syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box). Supports specifying values for all four sides: top, right, bottom, and left. - `T`: Single value that applies to all four sides. - `${T} ${T}`: Two values for block axis (top/bottom) and inline axis (left/right). - `${T} ${T} ${T}`: Three values for block-start (top), inline axis (left/right), and block-end (bottom). - `${T} ${T} ${T} ${T}`: Four values for block-start (top), inline-end (right), block-end (bottom), and inline-start (left).
T | `${T} ${T}` | `${T} ${T} ${T}` | `${T} ${T} ${T} ${T}`ImageProps
The properties for the image component when it's used in JSX.
- accessibilityRole
Sets the semantic meaning of the image content. When set, the role will be used by assistive technologies to help users navigate the page. - `'img'`: Identifies the element as an image that conveys meaningful information to users. - `'none'`: Completely hides the element and its content from assistive technologies. - `'presentation'`: Removes semantic meaning, making the image purely decorative and ignored by screen readers.
'img' | 'none' | 'presentation' - alt
Alternative text that describes the image for accessibility. Provides a text description of the image for users with assistive technology and serves as a fallback when the image fails to load. A well-written description enables people with visual impairments to understand non-text content. When a screen reader encounters an image, it reads this description aloud. When an image fails to load, this text displays on screen, helping all users understand what content was intended. Learn more about [writing effective alt text](https://www.shopify.com/ca/blog/image-alt-text#4) and the [alt attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt).
string - aspectRatio
The aspect ratio of the image. The rendering of the image will depend on the `inlineSize` value: - `inlineSize="fill"`: the aspect ratio will be respected and the image will take the necessary space. - `inlineSize="auto"`: the image will not render until it has loaded and the aspect ratio will be ignored. Learn more about the [aspect-ratio property](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio).
`${number}${optionalSpace}/${optionalSpace}${number}` | `${number}` - border
A shorthand for setting the border around the image. Accepts a size keyword alone (for example, `'base'`), a size and color (for example, `'base base'`), or a size, color, and style (for example, `'base base solid'`). Use `'none'` to remove the border.
BorderShorthand - borderRadius
The radius of the border corners around the image. You can use a single value to apply the same radius to all corners, or use the [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) to control individual corners.
MaybeAllValuesShorthandProperty<Extract<ImageProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>> - borderStyle
Controls the visual style of the border on all sides, such as solid, dashed, or dotted. When set, this overrides the style value specified in the `border` property. Supports [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) for specifying different styles per side: - One value: applies to all sides - Two values: applies to block sides (top/bottom) and inline sides (left/right) respectively - Three values: applies to block-start (top), inline sides (left/right), and block-end (bottom) respectively - Four values: applies to block-start (top), inline-end (right), block-end (bottom), and inline-start (left) respectively
MaybeAllValuesShorthandProperty<BorderStyleKeyword> | "" - borderWidth
The width of the border around the image. You can use a single value to apply the same width to all sides, or use the [1-to-4-value syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box) to control individual sides. When set, this overrides the width value specified in the `border` shorthand.
MaybeAllValuesShorthandProperty<ReducedBorderSizeKeyword> | '' - id
A unique identifier for the element. Use this to reference the element in JavaScript, link labels to form controls, or target specific elements for styling or scripting.
string - inlineSize
The inline width (horizontal size) of the image. - `'fill'`: The image takes up 100% of the available inline space. - `'auto'`: The image is displayed at its natural size. Learn more about the [width attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#width).
'fill' | 'auto' - loading
Determines the loading behavior of the image: - `'eager'`: Immediately loads the image, irrespective of its position within the visible viewport. - `'lazy'`: Delays loading the image until it approaches a specified distance from the viewport. Learn more about the [loading attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading).
'eager' | 'lazy' - objectFit
How the image should be resized to fit its container. The image is positioned in the center of the container. Learn more about the [object-fit property](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). - `'contain'`: Fits the entire image within the container, preserving aspect ratio. May leave empty space. - `'cover'`: Fills the container while preserving aspect ratio, cropping the image if needed.
'contain' | 'cover' - sizes
A set of media conditions and their corresponding sizes. Learn more about the [sizes attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#sizes).
string - src
The image source (either a remote URL or a local file resource). When the image is loading or no `src` is provided, a placeholder is rendered. Learn more about the [src attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src).
string - srcSet
A set of image sources and their width or pixel density descriptors. Learn more about the [srcset attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#srcset). This overrides the `src` property.
string
Preview

Examples
Code
Default
<s-image src="https://cdn.shopify.com/YOUR_IMAGE_HERE" alt="Product image"></s-image>
Anchor to best-practicesBest Practices
- Use high-resolution images to ensure a professional and high-quality experience.
- Use optimized images so your app loads as fast as possible.
- Use images intentionally, these should add clarity and lead users to the next step.