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.
In your component code, import the VisualMedia type from @wix/editor-react-types:
A VisualMedia has the following properties:
The media kind. Branch on it to choose the variant and its parameters.
The URL of the media file.
The slug for the media.
Description of the media for accessibility purposes.
The title of the media.
The height of the media in pixels.
The width of the media in pixels.
Kind-specific parameters, keyed to type.
Your code either consumes a value of type VisualMedia or produces one:
Last updated: 2 November 2026