Skip to main content

VendureImage

A component for displaying an image from a Vendure asset.

Supports the following features:

  • Presets
  • Cropping
  • Resizing
  • Formatting
  • Quality
  • Focal point
  • Fallback

Example

Tsx
Signature

Parameters

props

The props for the VendureImage component.

Signature
  • Extends: React.ImgHTMLAttributes<HTMLImageElement>

asset

propertyAssetLike | null | undefined

The asset to display.

preset

propertyImagePreset

The preset to use for the image.

mode

propertyImageMode

The crop/resize mode to use for the image.

width

propertynumber

The width of the image.

height

propertynumber

The height of the image.

format

propertyImageFormat

The format of the image.

quality

propertynumber

The quality of the image.

useFocalPoint

propertyboolean

Whether to use the asset's focal point in crop mode.

fallback

propertyReact.ReactNode

The fallback to show if no asset is provided. If no fallback is provided, a default placeholder will be shown.

ref

propertyReact.Ref<HTMLImageElement>

The ref to the image element.

The type of object that can be used as an asset in the VendureImage component.

Signature

id

propertystring

preview

propertystring

name

propertystring | null

focalPoint

property{ x: number; y: number } | null

The presets that can be used for the VendureImage component.

Signature

The formats that can be used for the VendureImage component.

Signature

The modes that can be used for the VendureImage component.

Signature
Was this chapter helpful?
Report Issue
Edited Feb 23, 2026ยทEdit this page