The Link to Media field is used for adding a link to a file in your Prismic media library. It is a specific configuration of the Link field.
Configuration
Assign the Link to Media field a Field name, API ID, and Field placeholder that will display in the entry editor.
JSON Editor
Here is an example of the JSON code for a Link to Media field:
"media_link": {
"type": "Link",
"config": {
"select": "media",
"label": "Media Link",
"placeholder": "Select a Media Asset"
}
}
JSON Reference
"type": (string, required) Value must equal "Link"
"config": (object, optional) Options listed below
config
"select": (string) Value must equal "media"
"label": (string) Sets the label that shows up for the field in the entry editor
"placeholder": (string) Sets a placeholder to display in the select field