VisualMedia

A single visual media item, either an image or a video. Use it for a field that shows one piece of visual media where either kind is acceptable. Your code checks the type field to tell which kind it received, then renders the matching element.

VisualMedia is a runtime-only type with no manifest dataType. It does not appear in the manifest data types, so it cannot be declared as a data property, context item, or function parameter or return. Only the runtime shape is documented.

Component

In your component code, import the VisualMedia type from @wix/editor-react-types:

Copy

A VisualMedia has the following properties:

type'image' | 'video'Required

The media kind. Branch on it to choose the variant and its parameters.


srcstringRequired

The URL of the media file.


slugstring

The slug for the media.


descriptionstring

Description of the media for accessibility purposes.


titlestring

The title of the media.


heightnumber

The height of the media in pixels.


widthnumber

The width of the media in pixels.


action{ link: Link | Phone | Email }

An action when the item is clicked. Its link is a Link, a Phone, or an Email.


parametersImageParameters | VideoParameters

Kind-specific parameters, keyed to type.

Usage

Your code either consumes a value of type VisualMedia or produces one:

Last updated: 2 November 2026

Did this help?