Skip to content

Recommended Media Attachment Format

The first three example are our recommendation on how to format image, video, and audio media attachments. Further properties are possible, and might make it into this recommendation at one point. Examples:

  • Focal point and blurhash, see Mastodon
  • fps (frames per second) for videos

The final example cannot be recommended yet as it is not widely supported. However, it illustrates how one can provide multiple versions of the media attachments. A high quality and low quality video in this case. The low quality video is enough for most use cases, and is 40 times smaller.

!!! info This recommendation is work in progress. A description of why these choices will hopefully appear as a FEP

Examples

Example 1

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://pleroma/users/full"
  ],
  "id": "http://pasture-one-actor/actor/xLtiFeRzaIo",
  "published": "2024-12-20T16:08:17Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://pleroma/users/full"
    ],
    "id": "http://pasture-one-actor/actor/Z05ZX3UM8MI",
    "published": "2024-12-20T16:08:17Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://www.w3.org/ns/credentials/v2",
      {
        "size": "https://joinpeertube.org/ns#size"
      }
    ],
    "content": "Recommended Image Format",
    "attachment": [
      {
        "type": "Image",
        "name": "A beautiful cow",
        "url": "http://pasture-one-actor/assets/cow.jpg",
        "width": 100,
        "height": 162,
        "mediaType": "image/jpeg",
        "digestMultibase": "zQmaeDPzhNL32WQZnnzB1H6QJWvvFNEHdViDB71yrxyXU1t",
        "size": 9045
      }
    ]
  }
}
pleroma
{
  "account": {
    "acct": "actor@pasture-one-actor",
    "avatar": "http://pleroma/images/avi.png",
    "avatar_static": "http://pleroma/images/avi.png",
    "bot": false,
    "created_at": "2024-12-20T16:06:15.000Z",
    "display_name": "Test Actor",
    "emojis": [],
    "fields": [],
    "followers_count": 0,
    "following_count": 0,
    "fqn": "actor@pasture-one-actor",
    "header": "http://pleroma/images/banner.png",
    "header_static": "http://pleroma/images/banner.png",
    "id": "ApF44cCic100e4Fywy",
    "last_status_at": "2024-12-20",
    "locked": false,
    "note": "",
    "pleroma": {
      "accepts_chat_messages": null,
      "also_known_as": [],
      "ap_id": "http://pasture-one-actor/actor",
      "avatar_description": "",
      "background_image": null,
      "favicon": null,
      "header_description": "",
      "hide_favorites": true,
      "hide_followers": false,
      "hide_followers_count": false,
      "hide_follows": false,
      "hide_follows_count": false,
      "is_admin": false,
      "is_confirmed": true,
      "is_moderator": false,
      "is_suggested": false,
      "privileges": [],
      "relationship": {},
      "skip_thread_containment": false,
      "tags": []
    },
    "source": {
      "fields": [],
      "note": "",
      "pleroma": {
        "actor_type": "Person",
        "discoverable": false
      },
      "sensitive": false
    },
    "statuses_count": 13,
    "url": "http://pasture-one-actor/actor",
    "username": "actor"
  },
  "application": null,
  "bookmarked": false,
  "card": null,
  "content": "Recommended Image Format",
  "created_at": "2024-12-20T16:08:17.000Z",
  "edited_at": null,
  "emojis": [],
  "favourited": false,
  "favourites_count": 0,
  "id": "ApF4FpvluuziP3gHAG",
  "in_reply_to_account_id": null,
  "in_reply_to_id": null,
  "language": null,
  "media_attachments": [
    {
      "blurhash": null,
      "description": "A beautiful cow",
      "id": "-1149766120",
      "meta": {
        "original": {
          "aspect": 0.6172839506172839,
          "height": 162,
          "width": 100
        }
      },
      "pleroma": {
        "mime_type": "image/jpeg"
      },
      "preview_url": "http://pasture-one-actor/assets/cow.jpg",
      "remote_url": "http://pasture-one-actor/assets/cow.jpg",
      "text_url": "http://pasture-one-actor/assets/cow.jpg",
      "type": "image",
      "url": "http://pasture-one-actor/assets/cow.jpg"
    }
  ],
  "mentions": [
    {
      "acct": "full",
      "id": "ApF3wdHD22u6xRAPs8",
      "url": "http://pleroma/users/full",
      "username": "full"
    }
  ],
  "muted": false,
  "pinned": false,
  "pleroma": {
    "bookmark_folder": null,
    "content": {
      "text/plain": "Recommended Image Format"
    },
    "context": "http://pasture-one-actor/actor/Z05ZX3UM8MI",
    "conversation_id": 1059322175,
    "direct_conversation_id": null,
    "emoji_reactions": [],
    "expires_at": null,
    "in_reply_to_account_acct": null,
    "list_id": null,
    "local": false,
    "parent_visible": false,
    "pinned_at": null,
    "quote": null,
    "quote_id": null,
    "quote_url": null,
    "quote_visible": false,
    "quotes_count": 0,
    "spoiler_text": {
      "text/plain": ""
    },
    "thread_muted": false
  },
  "poll": null,
  "reblog": null,
  "reblogged": false,
  "reblogs_count": 0,
  "replies_count": 0,
  "sensitive": false,
  "spoiler_text": "",
  "tags": [],
  "text": null,
  "uri": "http://pasture-one-actor/actor/Z05ZX3UM8MI",
  "url": "http://pasture-one-actor/actor/Z05ZX3UM8MI",
  "visibility": "public"
}

Example 2

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://pleroma/users/full"
  ],
  "id": "http://pasture-one-actor/actor/uheAFtP0dTg",
  "published": "2024-12-20T16:08:17Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://pleroma/users/full"
    ],
    "id": "http://pasture-one-actor/actor/tqw5UcqtfVI",
    "published": "2024-12-20T16:08:17Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://www.w3.org/ns/credentials/v2",
      {
        "size": "https://joinpeertube.org/ns#size"
      }
    ],
    "content": "Recommended Video Attachment",
    "attachment": [
      {
        "type": "Video",
        "url": "http://pasture-one-actor/assets/cow_eating.mp4",
        "name": "A beautiful cow eating",
        "width": 256,
        "height": 144,
        "mediaType": "video/mp4",
        "digestMultibase": "zQmSzK5qEe5tpjwGMhmjx9RvVoPkWhEmCwxP2s7wPMpKMoK",
        "size": 54373,
        "duration": "PT3S"
      }
    ]
  }
}
pleroma
{
  "account": {
    "acct": "actor@pasture-one-actor",
    "avatar": "http://pleroma/images/avi.png",
    "avatar_static": "http://pleroma/images/avi.png",
    "bot": false,
    "created_at": "2024-12-20T16:06:15.000Z",
    "display_name": "Test Actor",
    "emojis": [],
    "fields": [],
    "followers_count": 0,
    "following_count": 0,
    "fqn": "actor@pasture-one-actor",
    "header": "http://pleroma/images/banner.png",
    "header_static": "http://pleroma/images/banner.png",
    "id": "ApF44cCic100e4Fywy",
    "last_status_at": "2024-12-20",
    "locked": false,
    "note": "",
    "pleroma": {
      "accepts_chat_messages": null,
      "also_known_as": [],
      "ap_id": "http://pasture-one-actor/actor",
      "avatar_description": "",
      "background_image": null,
      "favicon": null,
      "header_description": "",
      "hide_favorites": true,
      "hide_followers": false,
      "hide_followers_count": false,
      "hide_follows": false,
      "hide_follows_count": false,
      "is_admin": false,
      "is_confirmed": true,
      "is_moderator": false,
      "is_suggested": false,
      "privileges": [],
      "relationship": {},
      "skip_thread_containment": false,
      "tags": []
    },
    "source": {
      "fields": [],
      "note": "",
      "pleroma": {
        "actor_type": "Person",
        "discoverable": false
      },
      "sensitive": false
    },
    "statuses_count": 14,
    "url": "http://pasture-one-actor/actor",
    "username": "actor"
  },
  "application": null,
  "bookmarked": false,
  "card": null,
  "content": "Recommended Video Attachment",
  "created_at": "2024-12-20T16:08:17.000Z",
  "edited_at": null,
  "emojis": [],
  "favourited": false,
  "favourites_count": 0,
  "id": "ApF4Fu6YOlznLekwWe",
  "in_reply_to_account_id": null,
  "in_reply_to_id": null,
  "language": null,
  "media_attachments": [
    {
      "blurhash": null,
      "description": "A beautiful cow eating",
      "id": "70207247",
      "meta": {
        "original": {
          "aspect": 1.7777777777777777,
          "height": 144,
          "width": 256
        }
      },
      "pleroma": {
        "mime_type": "video/mp4"
      },
      "preview_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "remote_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "text_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "type": "video",
      "url": "http://pasture-one-actor/assets/cow_eating.mp4"
    }
  ],
  "mentions": [
    {
      "acct": "full",
      "id": "ApF3wdHD22u6xRAPs8",
      "url": "http://pleroma/users/full",
      "username": "full"
    }
  ],
  "muted": false,
  "pinned": false,
  "pleroma": {
    "bookmark_folder": null,
    "content": {
      "text/plain": "Recommended Video Attachment"
    },
    "context": "http://pasture-one-actor/actor/tqw5UcqtfVI",
    "conversation_id": 2016491294,
    "direct_conversation_id": null,
    "emoji_reactions": [],
    "expires_at": null,
    "in_reply_to_account_acct": null,
    "list_id": null,
    "local": false,
    "parent_visible": false,
    "pinned_at": null,
    "quote": null,
    "quote_id": null,
    "quote_url": null,
    "quote_visible": false,
    "quotes_count": 0,
    "spoiler_text": {
      "text/plain": ""
    },
    "thread_muted": false
  },
  "poll": null,
  "reblog": null,
  "reblogged": false,
  "reblogs_count": 0,
  "replies_count": 0,
  "sensitive": false,
  "spoiler_text": "",
  "tags": [],
  "text": null,
  "uri": "http://pasture-one-actor/actor/tqw5UcqtfVI",
  "url": "http://pasture-one-actor/actor/tqw5UcqtfVI",
  "visibility": "public"
}

Example 3

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://pleroma/users/full"
  ],
  "id": "http://pasture-one-actor/actor/3tJFQHcxoFQ",
  "published": "2024-12-20T16:08:18Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://pleroma/users/full"
    ],
    "id": "http://pasture-one-actor/actor/wYaiXn8tyEc",
    "published": "2024-12-20T16:08:18Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://www.w3.org/ns/credentials/v2",
      {
        "size": "https://joinpeertube.org/ns#size"
      }
    ],
    "content": "Recommended Audio Format",
    "attachment": [
      {
        "type": "Audio",
        "url": "http://pasture-one-actor/assets/cow_moo.mp3",
        "name": "A cow mooing",
        "mediaType": "audio/mpeg",
        "digestMultibase": "zQmSXTyLCPqoiGoUUwKRMKgFdddaAUkvQNr29nhB6tahb9Z",
        "size": 67709,
        "duration": "PT2.1S"
      }
    ]
  }
}
pleroma
{
  "account": {
    "acct": "actor@pasture-one-actor",
    "avatar": "http://pleroma/images/avi.png",
    "avatar_static": "http://pleroma/images/avi.png",
    "bot": false,
    "created_at": "2024-12-20T16:06:15.000Z",
    "display_name": "Test Actor",
    "emojis": [],
    "fields": [],
    "followers_count": 0,
    "following_count": 0,
    "fqn": "actor@pasture-one-actor",
    "header": "http://pleroma/images/banner.png",
    "header_static": "http://pleroma/images/banner.png",
    "id": "ApF44cCic100e4Fywy",
    "last_status_at": "2024-12-20",
    "locked": false,
    "note": "",
    "pleroma": {
      "accepts_chat_messages": null,
      "also_known_as": [],
      "ap_id": "http://pasture-one-actor/actor",
      "avatar_description": "",
      "background_image": null,
      "favicon": null,
      "header_description": "",
      "hide_favorites": true,
      "hide_followers": false,
      "hide_followers_count": false,
      "hide_follows": false,
      "hide_follows_count": false,
      "is_admin": false,
      "is_confirmed": true,
      "is_moderator": false,
      "is_suggested": false,
      "privileges": [],
      "relationship": {},
      "skip_thread_containment": false,
      "tags": []
    },
    "source": {
      "fields": [],
      "note": "",
      "pleroma": {
        "actor_type": "Person",
        "discoverable": false
      },
      "sensitive": false
    },
    "statuses_count": 15,
    "url": "http://pasture-one-actor/actor",
    "username": "actor"
  },
  "application": null,
  "bookmarked": false,
  "card": null,
  "content": "Recommended Audio Format",
  "created_at": "2024-12-20T16:08:18.000Z",
  "edited_at": null,
  "emojis": [],
  "favourited": false,
  "favourites_count": 0,
  "id": "ApF4FyEV3AjE9SVLSy",
  "in_reply_to_account_id": null,
  "in_reply_to_id": null,
  "language": null,
  "media_attachments": [
    {
      "blurhash": null,
      "description": "A cow mooing",
      "id": "1474550563",
      "pleroma": {
        "mime_type": "audio/mpeg"
      },
      "preview_url": "http://pasture-one-actor/assets/cow_moo.mp3",
      "remote_url": "http://pasture-one-actor/assets/cow_moo.mp3",
      "text_url": "http://pasture-one-actor/assets/cow_moo.mp3",
      "type": "audio",
      "url": "http://pasture-one-actor/assets/cow_moo.mp3"
    }
  ],
  "mentions": [
    {
      "acct": "full",
      "id": "ApF3wdHD22u6xRAPs8",
      "url": "http://pleroma/users/full",
      "username": "full"
    }
  ],
  "muted": false,
  "pinned": false,
  "pleroma": {
    "bookmark_folder": null,
    "content": {
      "text/plain": "Recommended Audio Format"
    },
    "context": "http://pasture-one-actor/actor/wYaiXn8tyEc",
    "conversation_id": 1166994278,
    "direct_conversation_id": null,
    "emoji_reactions": [],
    "expires_at": null,
    "in_reply_to_account_acct": null,
    "list_id": null,
    "local": false,
    "parent_visible": false,
    "pinned_at": null,
    "quote": null,
    "quote_id": null,
    "quote_url": null,
    "quote_visible": false,
    "quotes_count": 0,
    "spoiler_text": {
      "text/plain": ""
    },
    "thread_muted": false
  },
  "poll": null,
  "reblog": null,
  "reblogged": false,
  "reblogs_count": 0,
  "replies_count": 0,
  "sensitive": false,
  "spoiler_text": "",
  "tags": [],
  "text": null,
  "uri": "http://pasture-one-actor/actor/wYaiXn8tyEc",
  "url": "http://pasture-one-actor/actor/wYaiXn8tyEc",
  "visibility": "public"
}

Example 4

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://pleroma/users/full"
  ],
  "id": "http://pasture-one-actor/actor/SuO7uqYDCFY",
  "published": "2024-12-20T16:08:19Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://pleroma/users/full"
    ],
    "id": "http://pasture-one-actor/actor/zX1oe5adX-A",
    "published": "2024-12-20T16:08:19Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://www.w3.org/ns/credentials/v2",
      {
        "size": "https://joinpeertube.org/ns#size"
      }
    ],
    "content": "Multiple formats for video",
    "attachment": [
      {
        "type": "Video",
        "name": "A beautiful cow eating",
        "url": [
          {
            "type": "Link",
            "size": 54373,
            "digest": "zQmSzK5qEe5tpjwGMhmjx9RvVoPkWhEmCwxP2s7wPMpKMoK",
            "width": 256,
            "height": 144,
            "href": "http://pasture-one-actor/assets/cow_eating.mp4",
            "mediaType": "video/mp4"
          },
          {
            "type": "Link",
            "size": 2271723,
            "digest": "zQme2X4rgWuRdmAtGGMSEbdoeRQ2NAL2VptcdRGTYDZbSKG",
            "width": 1920,
            "height": 1080,
            "href": "http://pasture-one-actor/assets/cow_eating_hd.mp4",
            "mediaType": "video/mp4"
          }
        ],
        "duration": "PT3S"
      }
    ]
  }
}
pleroma
{
  "account": {
    "acct": "actor@pasture-one-actor",
    "avatar": "http://pleroma/images/avi.png",
    "avatar_static": "http://pleroma/images/avi.png",
    "bot": false,
    "created_at": "2024-12-20T16:06:15.000Z",
    "display_name": "Test Actor",
    "emojis": [],
    "fields": [],
    "followers_count": 0,
    "following_count": 0,
    "fqn": "actor@pasture-one-actor",
    "header": "http://pleroma/images/banner.png",
    "header_static": "http://pleroma/images/banner.png",
    "id": "ApF44cCic100e4Fywy",
    "last_status_at": "2024-12-20",
    "locked": false,
    "note": "",
    "pleroma": {
      "accepts_chat_messages": null,
      "also_known_as": [],
      "ap_id": "http://pasture-one-actor/actor",
      "avatar_description": "",
      "background_image": null,
      "favicon": null,
      "header_description": "",
      "hide_favorites": true,
      "hide_followers": false,
      "hide_followers_count": false,
      "hide_follows": false,
      "hide_follows_count": false,
      "is_admin": false,
      "is_confirmed": true,
      "is_moderator": false,
      "is_suggested": false,
      "privileges": [],
      "relationship": {},
      "skip_thread_containment": false,
      "tags": []
    },
    "source": {
      "fields": [],
      "note": "",
      "pleroma": {
        "actor_type": "Person",
        "discoverable": false
      },
      "sensitive": false
    },
    "statuses_count": 16,
    "url": "http://pasture-one-actor/actor",
    "username": "actor"
  },
  "application": null,
  "bookmarked": false,
  "card": null,
  "content": "Multiple formats for video",
  "created_at": "2024-12-20T16:08:19.000Z",
  "edited_at": null,
  "emojis": [],
  "favourited": false,
  "favourites_count": 0,
  "id": "ApF4G2A2RhXKKmRq4G",
  "in_reply_to_account_id": null,
  "in_reply_to_id": null,
  "language": null,
  "media_attachments": [
    {
      "blurhash": null,
      "description": "A beautiful cow eating",
      "id": "70207247",
      "meta": {
        "original": {
          "aspect": 1.7777777777777777,
          "height": 144,
          "width": 256
        }
      },
      "pleroma": {
        "mime_type": "video/mp4"
      },
      "preview_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "remote_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "text_url": "http://pasture-one-actor/assets/cow_eating.mp4",
      "type": "video",
      "url": "http://pasture-one-actor/assets/cow_eating.mp4"
    }
  ],
  "mentions": [
    {
      "acct": "full",
      "id": "ApF3wdHD22u6xRAPs8",
      "url": "http://pleroma/users/full",
      "username": "full"
    }
  ],
  "muted": false,
  "pinned": false,
  "pleroma": {
    "bookmark_folder": null,
    "content": {
      "text/plain": "Multiple formats for video"
    },
    "context": "http://pasture-one-actor/actor/zX1oe5adX-A",
    "conversation_id": 1590284209,
    "direct_conversation_id": null,
    "emoji_reactions": [],
    "expires_at": null,
    "in_reply_to_account_acct": null,
    "list_id": null,
    "local": false,
    "parent_visible": false,
    "pinned_at": null,
    "quote": null,
    "quote_id": null,
    "quote_url": null,
    "quote_visible": false,
    "quotes_count": 0,
    "spoiler_text": {
      "text/plain": ""
    },
    "thread_muted": false
  },
  "poll": null,
  "reblog": null,
  "reblogged": false,
  "reblogs_count": 0,
  "replies_count": 0,
  "sensitive": false,
  "spoiler_text": "",
  "tags": [],
  "text": null,
  "uri": "http://pasture-one-actor/actor/zX1oe5adX-A",
  "url": "http://pasture-one-actor/actor/zX1oe5adX-A",
  "visibility": "public"
}