Components/Media
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/image
Images communicate product information to users with visuals.
<Avatar/> instead.<ImageViewer/> solution instead.Specify image dimensions in pixels or percentage with width and height props.
To separate images from backgrounds, enable the image bordershowBorder.
Control the rounded corners of the image box with the borderRadius prop. Radius levels can be specified for every corner.
Use the src prop to display a link to a media file. If the src prop is added without a link, the default placeholder shows.
To remove the background color for PNG images or vector graphics, use the transparent prop.
Control how images are displayed when their dimensions don't match the size of their containers with the fit prop. It supports all default object-fit values, but there are four that are most commonly used:
contain maintains the aspect ratio while fitting images within containers.cover maintains the aspect ratio and clips images to fill containers.none loads the original image size and positions it in the center of the container.tile repeats images when their dimensions are smaller than the containers.Control image placement inside of a bounding box with the position property. Specify the starting position of the image from where its fit will be defined.
Use images with mixed corner radius levels in cases when they touch the edges of cards.
Use images to display product thumbnails in lists and widgets.
By default, all images have empty alt text.
Use this alt decision tree to determine whether an image needs alt text.
| Name | Type | Default | Description |
|---|---|---|---|
alt | string | '' | Specifies an alt text for an image. If not provided, it is set to empty and treated as decorative. |
borderRadius | string | number | string & {} | — | Sets the border radius of the image box. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
fit | "none" | "fill" | "contain" | "cover" | "scale-down" | "tile" | cover | Specifies image fit mode inside a box. tile repeats the image, and the other values set the CSS object-fit property. |
height | string | number | undefined | Sets the height of the image box. |
position | string | center | Specifies source content position inside of an image box. Accepts any valid CSS position value, for example center or top left. |
showBorder | boolean | false | Specifies whether to display a border around an image. |
src | string | — | Specifies an URL link to image source. If not provided, a default placeholder image is displayed. |
transparent | boolean | false | Specifies whether background of Image is transparent. |
width | string | number | '100%' | Sets the width of the image box. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
isTransparent | Checks whether background of Image is transparent |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 22 October 2026