Skip to main content

Thumbnail

Display a small preview image representing content, products, or media.

string
Default: `''`

An alternative text description that describe the image for the reader to understand what it is about. It is extremely useful for both users using assistive technology and sighted users. A well written description provides people with visual impairments the ability to participate in consuming non-text content. When a screen readers encounters an s-image, the description is read and announced aloud. If an image fails to load, potentially due to a poor connection, the alt is displayed on screen instead. This has the benefit of letting a sighted buyer know an image was meant to load here, but as an alternative, they’re still able to consume the text content. Read considerations when writing alternative text to learn more.

"small" | "small-200" | "small-100" | "base" | "large" | "large-100"
Default: 'base'

Adjusts the size the product thumbnail image.

string

The image source (either a remote URL or a local file resource).

When the image is loading or no src is provided, a placeholder will be rendered.

Learn more about registering events.

Anchor to error
error
OnErrorEventHandler
<typeof tagName> | null
Examples
<s-thumbnail
alt="White sneakers"
src="https://cdn.shopify.com/static/images/polaris/thumbnail-wc_src.jpg"
/>

Preview

  • Identifying items visually in lists, tables, or cards
  • Seeing a preview of images before uploading or publishing
  • Distinguishing between similar items by their appearance
  • Confirming the correct item is selected

  • small-200: use in very small areas
  • small: use in small areas
  • base: use as the default size
  • large: use when thumbnail is a focal point

Alternative text should be accurate, concise, and descriptive:

  • Use "Image of", "Photo of" prefix
  • Be primary visual content: "Image of a woman with curly brown hair smiling"
  • Include relevant emotions: "Image of a woman laughing with her hand on her face"
Was this page helpful?