Skip to content

Image Attachments

The Image type is defined in ActivityStreams Vocabulary.

In the following, we test how various configurations of it are rendered.

A ❌ in the support table means that the entire message has failed to parse. A "-" means that the message was parsed, but no attachment was generated. The text, e.g. image or unknown is the the media type the Fediverse application determined for the attachment.

We furthermore wish to point out that having several links in the url property is useful to both offer the attachment in different formats and say dimensions, e.g. one high resolution and one low resolution one.

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/2i-CKGbUEfk",
  "published": "2025-03-07T12:43:53Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/hCsiN02JRgI",
    "published": "2025-03-07T12:43:53Z",
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001.png"
    },
    "cc": []
  }
}

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/OJV2tBpXrww",
  "published": "2025-03-07T12:44:06Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/m_BNODWo8yo",
    "published": "2025-03-07T12:44:06Z",
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001b.png",
      "mediaType": "image/png"
    },
    "cc": []
  }
}

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/muAnz6GDNz4",
  "published": "2025-03-07T12:44:19Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/BaxgXgZdIfk",
    "published": "2025-03-07T12:44:19Z",
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002.jpg"
    },
    "cc": []
  }
}

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/_Ni-wBt_io8",
  "published": "2025-03-07T12:44:32Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/IJTxw9jeh08",
    "published": "2025-03-07T12:44:32Z",
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002b.jpg",
      "mediaType": "image/jpeg"
    },
    "cc": []
  }
}

Example 5

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/NGeJ6ybM0qQ",
  "published": "2025-03-07T12:44:45Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/Ql-zF1H619Y",
    "published": "2025-03-07T12:44:45Z",
    "content": "Format svg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/assets/FediverseLogo.svg"
    },
    "cc": []
  }
}

Example 6

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/Ou1tLWv79d0",
  "published": "2025-03-07T12:44:58Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/lYr6ViQcV74",
    "published": "2025-03-07T12:44:58Z",
    "content": "Format eps",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003.eps"
    },
    "cc": []
  }
}

Example 7

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/ndxBVijTJ2A",
  "published": "2025-03-07T12:45:12Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/U3LhC9D4Ugg",
    "published": "2025-03-07T12:45:12Z",
    "content": "Format gif",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003b.gif"
    },
    "cc": []
  }
}

Example 8

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/nTGym2Wp9wg",
  "published": "2025-03-07T12:45:25Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/qyXZzE9BkpM",
    "published": "2025-03-07T12:45:25Z",
    "content": "Format tiff",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003c.tiff"
    },
    "cc": []
  }
}

Example 9

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/9TBYZVdHRGs",
  "published": "2025-03-07T12:45:38Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/1DeAIjYeK40",
    "published": "2025-03-07T12:45:38Z",
    "content": "Format webp",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003d.webp"
    },
    "cc": []
  }
}

Example 10

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/7CIu6YboY7s",
  "published": "2025-03-07T12:45:51Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/hEiADdbhd5A",
    "published": "2025-03-07T12:45:51Z",
    "content": "url does not exit",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/assets/does_not_exist.png"
    },
    "cc": []
  }
}

Example 11

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/p2a9deKiBrQ",
  "published": "2025-03-07T12:46:04Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/Gd5ryfXsIAk",
    "published": "2025-03-07T12:46:04Z",
    "content": "Wrong height / width",
    "attachment": {
      "type": "Document",
      "width": 13,
      "height": 17,
      "url": "http://pasture-one-actor/images/004.png"
    },
    "cc": []
  }
}

Example 12

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/J1cu2g39roU",
  "published": "2025-03-07T12:46:17Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/9Tz6IQugwZ8",
    "published": "2025-03-07T12:46:17Z",
    "content": "No type",
    "attachment": {
      "url": "http://pasture-one-actor/images/005.png"
    },
    "cc": []
  }
}

Example 13

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/caCpaKRtrNw",
  "published": "2025-03-07T12:46:31Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/fQHx8-PyFvM",
    "published": "2025-03-07T12:46:31Z",
    "content": "url is Link object",
    "attachment": {
      "type": "Image",
      "url": {
        "type": "Link",
        "href": "http://pasture-one-actor/images/006.png"
      }
    },
    "cc": []
  }
}

Example 14

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/7JtrnQyTNps",
  "published": "2025-03-07T12:46:44Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/Y-XqVhJff7I",
    "published": "2025-03-07T12:46:44Z",
    "content": "url is Link object with media type",
    "attachment": {
      "type": "Image",
      "url": {
        "type": "Link",
        "href": "http://pasture-one-actor/images/006b.png",
        "mediaType": "image/png"
      }
    },
    "cc": []
  }
}

Example 15

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/iAkuwSKWl8E",
  "published": "2025-03-07T12:46:57Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/SrbVCZUvHMk",
    "published": "2025-03-07T12:46:57Z",
    "content": "url is Link object in an array",
    "attachment": {
      "type": "Image",
      "url": [
        {
          "type": "Link",
          "href": "http://pasture-one-actor/images/006c.png"
        }
      ]
    },
    "cc": []
  }
}

Example 16

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://mbin/u/oscar"
  ],
  "id": "http://pasture-one-actor/actor/qVO9cMRb1eY",
  "published": "2025-03-07T12:47:10Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mbin/u/oscar"
    ],
    "id": "http://pasture-one-actor/actor/_IOUctR7vrY",
    "published": "2025-03-07T12:47:10Z",
    "content": "url is array of two Link objects",
    "attachment": {
      "type": "Image",
      "url": [
        {
          "type": "Link",
          "href": "http://pasture-one-actor/images/007.png",
          "mediaType": "image/png"
        },
        {
          "type": "Link",
          "href": "http://pasture-one-actor/images/008.jpg",
          "mediaType": "image/jpeg"
        }
      ]
    },
    "cc": []
  }
}