Media

Description

Media elements represent individual media items such as images, videos, or files in ADF. They contain references to media stored in Atlassian's media services with attributes for dimensions, alternative text, and display properties.

.md markdown syntax

Standard Media Reference

![Alt text](media:media-id-123)

Media with Dimensions

<!-- adf:media width="500" height="300" -->
![Product screenshot](media:screenshot-456)

Media with Custom Attributes

<!-- adf:media collection="MediaServicesSample" occurrenceKey="occurrence-key" -->
![Document preview](media:document-789)

.adf-schema.json schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "media"
    },
    "attrs": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique media identifier"
        },
        "type": {
          "type": "string",
          "enum": ["file", "link", "external"],
          "description": "Media type"
        },
        "collection": {
          "type": "string",
          "description": "Media collection name"
        },
        "occurrenceKey": {
          "type": "string",
          "description": "Media occurrence key"
        },
        "width": {
          "type": "number",
          "description": "Media width in pixels"
        },
        "height": {
          "type": "number",
          "description": "Media height in pixels"
        },
        "alt": {
          "type": "string",
          "description": "Alternative text for accessibility"
        }
      },
      "required": ["id", "type", "collection"],
      "additionalProperties": true
    }
  },
  "required": ["type", "attrs"]
}

Examples

Image References

Document Attachments

Media with Alt Text

Media Collections

Sized Media

Video Media

Media in Documentation

Media with Captions

External Media References

Media in Lists

Media Galleries

Media with Error Handling

Last updated