A component for displaying an image from a Vendure asset.
Supports the following features:
Example
Parameters
VendureImagePropsThe props for the VendureImage component.
React.ImgHTMLAttributes<HTMLImageElement>AssetLike | null | undefinedThe asset to display.
ImagePresetThe preset to use for the image.
ImageModeThe crop/resize mode to use for the image.
numberThe width of the image.
numberThe height of the image.
ImageFormatThe format of the image.
numberThe quality of the image.
booleanWhether to use the asset's focal point in crop mode.
React.ReactNodeThe fallback to show if no asset is provided. If no fallback is provided, a default placeholder will be shown.
React.Ref<HTMLImageElement>The ref to the image element.
The type of object that can be used as an asset in the VendureImage component.
stringstringstring | null{ x: number; y: number } | nullThe presets that can be used for the VendureImage component.
The formats that can be used for the VendureImage component.
The modes that can be used for the VendureImage component.