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.

The recommended format is documented in FEP-1311: Media Attachments.

Examples

Example 1

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://www.w3.org/ns/credentials/v2",
    {
      "size": "https://joinpeertube.org/ns#size"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ag0mqqelszbk0003"
  ],
  "id": "http://pasture-one-actor/activity/xHF3qUy9WfQ",
  "published": "2025-12-08T11:27:47Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ag0mqqelszbk0003"
    ],
    "id": "http://pasture-one-actor/object/rT3d01To1gk",
    "published": "2025-12-08T11:27:47Z",
    "@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
      }
    ]
  }
}
misskey
{
  "id": "ag0mt35kgsyv001v",
  "createdAt": "2025-12-08T11:27:47.000Z",
  "userId": "ag0msgbpgsyv0003",
  "user": {
    "id": "ag0msgbpgsyv0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Recommended Image Format",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [
    "ag0mt3ttgsyv001u"
  ],
  "files": [
    {
      "id": "ag0mt3ttgsyv001u",
      "createdAt": "2025-12-08T11:27:47.873Z",
      "name": "cow.jpg",
      "type": "image/jpeg",
      "md5": "79665fe8c07445157afebd1543f36b71",
      "size": 0,
      "isSensitive": false,
      "blurhash": "ejK^]TI9_3t6NG_4%gRkV[of%hWCIUt7jEo#V@aJbHofazadjYWVkD",
      "properties": {
        "width": 200,
        "height": 164
      },
      "url": "http://misskey/files/webpublic-48eca195-222a-4ceb-bacb-c172dbb01d02",
      "thumbnailUrl": "http://misskey/proxy/static.webp?url=http%3A%2F%2Fpasture-one-actor%2Fassets%2Fcow.jpg&static=1",
      "comment": "A beautiful cow",
      "folderId": null,
      "folder": null,
      "userId": "ag0msgbpgsyv0003",
      "user": null
    }
  ],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/rT3d01To1gk",
  "clippedCount": 0
}

Example 2

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://www.w3.org/ns/credentials/v2",
    {
      "size": "https://joinpeertube.org/ns#size"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ag0mqqelszbk0003"
  ],
  "id": "http://pasture-one-actor/activity/Q2hn72aEQIs",
  "published": "2025-12-08T11:27:48Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ag0mqqelszbk0003"
    ],
    "id": "http://pasture-one-actor/object/_N0B0I-UfhA",
    "published": "2025-12-08T11:27:48Z",
    "@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"
      }
    ]
  }
}
misskey
{
  "id": "ag0mt3xcgsyv001x",
  "createdAt": "2025-12-08T11:27:48.000Z",
  "userId": "ag0msgbpgsyv0003",
  "user": {
    "id": "ag0msgbpgsyv0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Recommended Video Attachment",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [
    "ag0mt4abgsyv001w"
  ],
  "files": [
    {
      "id": "ag0mt4abgsyv001w",
      "createdAt": "2025-12-08T11:27:48.467Z",
      "name": "cow_eating.mp4",
      "type": "video/mp4",
      "md5": "19e0d3ecdd0230ed857c9c88dd247012",
      "size": 0,
      "isSensitive": false,
      "blurhash": null,
      "properties": {},
      "url": "http://misskey/files/webpublic-acf759cd-f32b-4030-afb9-3aee636ac4de",
      "thumbnailUrl": null,
      "comment": "A beautiful cow eating",
      "folderId": null,
      "folder": null,
      "userId": "ag0msgbpgsyv0003",
      "user": null
    }
  ],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/_N0B0I-UfhA",
  "clippedCount": 0
}

Example 3

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://www.w3.org/ns/credentials/v2",
    {
      "size": "https://joinpeertube.org/ns#size"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ag0mqqelszbk0003"
  ],
  "id": "http://pasture-one-actor/activity/YInAi7Wi7YQ",
  "published": "2025-12-08T11:27:48Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ag0mqqelszbk0003"
    ],
    "id": "http://pasture-one-actor/object/_k0oL7hK0Yk",
    "published": "2025-12-08T11:27:48Z",
    "@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"
      }
    ]
  }
}
misskey
{
  "id": "ag0mt3xcgsyv001z",
  "createdAt": "2025-12-08T11:27:48.000Z",
  "userId": "ag0msgbpgsyv0003",
  "user": {
    "id": "ag0msgbpgsyv0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Recommended Audio Format",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [
    "ag0mt4mtgsyv001y"
  ],
  "files": [
    {
      "id": "ag0mt4mtgsyv001y",
      "createdAt": "2025-12-08T11:27:48.917Z",
      "name": "cow_moo.mp3",
      "type": "audio/mpeg",
      "md5": "af0b1c1fdd1e74cb559072d725f7de31",
      "size": 0,
      "isSensitive": false,
      "blurhash": null,
      "properties": {},
      "url": "http://misskey/files/webpublic-fabcbb34-b185-469b-9290-0fcd31f8cdc6",
      "thumbnailUrl": "http://misskey/proxy/static.webp?url=http%3A%2F%2Fpasture-one-actor%2Fassets%2Fcow_moo.mp3&static=1",
      "comment": "A cow mooing",
      "folderId": null,
      "folder": null,
      "userId": "ag0msgbpgsyv0003",
      "user": null
    }
  ],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/_k0oL7hK0Yk",
  "clippedCount": 0
}

Example 4

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://www.w3.org/ns/credentials/v2",
    {
      "size": "https://joinpeertube.org/ns#size"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ag0mqqelszbk0003"
  ],
  "id": "http://pasture-one-actor/activity/l5qvXr4fSDU",
  "published": "2025-12-08T11:27:49Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ag0mqqelszbk0003"
    ],
    "id": "http://pasture-one-actor/object/Cp2OYsq8zCs",
    "published": "2025-12-08T11:27:49Z",
    "@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"
      }
    ]
  }
}
misskey
{
  "id": "ag0mt4p4gsyv0020",
  "createdAt": "2025-12-08T11:27:49.000Z",
  "userId": "ag0msgbpgsyv0003",
  "user": {
    "id": "ag0msgbpgsyv0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Multiple formats for video",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/Cp2OYsq8zCs",
  "clippedCount": 0
}