Media
We provide a standard set of choosers for media types, including images and video, to make it easy for users to choose media to add to their content. When a chooser definition is included in a content type, the content form user interface allows the user to choose images or video from their media library using a simple media browser.
The supported media choosers are shown below:
Chooser | Schema |
---|---|
Image | http://bigcontent.io/cms/schema/v1/core#/definitions/image-link |
Video | http://bigcontent.io/cms/schema/v1/core#/definitions/video-link |
ImagesLink copied!
An example property for an image is shown below.
The allOf
keyword specifies that only an image can be chosen.
VideoLink copied!
An example video is shown below.
In this case the allOf
keyword specifies that only a video can be chosen.
Images and videoLink copied!
If we wanted the background to be either an image or a video, then the anyOf
keyword can be used and both the image and video choosers specified. The user will then be able to choose a single image or video.
Once the content is saved, the media
property of this content item will contain a reference to an image or video.