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.

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/N_tuf5DWYd4",
  "published": "2024-10-29T14:23: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/sKws2m7fOHk",
    "published": "2024-10-29T14:23:38Z",
    "cc": [],
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001.png"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/QElXUe03CdY",
  "published": "2024-10-29T14:23: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/7uR95l3nZeA",
    "published": "2024-10-29T14:23:53Z",
    "cc": [],
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001b.png",
      "mediaType": "image/png"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/MYFpVdfRvH8",
  "published": "2024-10-29T14:24:08Z",
  "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/XWx3hXhS-6Y",
    "published": "2024-10-29T14:24:08Z",
    "cc": [],
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002.jpg"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/AOWlfurpOAc",
  "published": "2024-10-29T14:24:23Z",
  "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/zdPnv4j74WM",
    "published": "2024-10-29T14:24:23Z",
    "cc": [],
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002b.jpg",
      "mediaType": "image/jpeg"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/On235hxqXk8",
  "published": "2024-10-29T14:24: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/-_DJvWPKUkM",
    "published": "2024-10-29T14:24:38Z",
    "cc": [],
    "content": "Format svg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/assets/FediverseLogo.svg"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/1n9RlHY1T6k",
  "published": "2024-10-29T14:24: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/2Lx_sWDelwk",
    "published": "2024-10-29T14:24:53Z",
    "cc": [],
    "content": "Format eps",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003.eps"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/57VSdppsN5Q",
  "published": "2024-10-29T14:25:07Z",
  "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/BFumXoasfl0",
    "published": "2024-10-29T14:25:07Z",
    "cc": [],
    "content": "Format gif",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003b.gif"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/UclyVFttzgE",
  "published": "2024-10-29T14:25:21Z",
  "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/aoKQKxAD3po",
    "published": "2024-10-29T14:25:21Z",
    "cc": [],
    "content": "Format tiff",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003c.tiff"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/3G_p1gC17ZI",
  "published": "2024-10-29T14:25:35Z",
  "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/twhewbvQqsM",
    "published": "2024-10-29T14:25:35Z",
    "cc": [],
    "content": "Format webp",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003d.webp"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/wCXgtdFWtbc",
  "published": "2024-10-29T14:25:50Z",
  "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/u5ng9JsBcbk",
    "published": "2024-10-29T14:25:50Z",
    "cc": [],
    "content": "url does not exit",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/assets/does_not_exist.png"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/K1Gz3uV0uaE",
  "published": "2024-10-29T14:26: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/0L_29TYYUlA",
    "published": "2024-10-29T14:26:04Z",
    "cc": [],
    "content": "Wrong height / width",
    "attachment": {
      "type": "Document",
      "width": 13,
      "height": 17,
      "url": "http://pasture-one-actor/images/004.png"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/TkoPXJekUxI",
  "published": "2024-10-29T14:26:18Z",
  "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/agC0d8CF-6s",
    "published": "2024-10-29T14:26:18Z",
    "cc": [],
    "content": "No type",
    "attachment": {
      "url": "http://pasture-one-actor/images/005.png"
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/tNJ0Y7qxe30",
  "published": "2024-10-29T14:26: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/0Fa4bFLzHJI",
    "published": "2024-10-29T14:26:32Z",
    "cc": [],
    "content": "url is Link object",
    "attachment": {
      "type": "Image",
      "url": {
        "type": "Link",
        "href": "http://pasture-one-actor/images/006.png"
      }
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/EA_Zo5gJel8",
  "published": "2024-10-29T14:26:47Z",
  "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/XuLQBxORe7w",
    "published": "2024-10-29T14:26:47Z",
    "cc": [],
    "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"
      }
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/d2hygQwIu74",
  "published": "2024-10-29T14:27:01Z",
  "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/IWxCLuxC9Mo",
    "published": "2024-10-29T14:27:01Z",
    "cc": [],
    "content": "url is Link object in an array",
    "attachment": {
      "type": "Image",
      "url": [
        {
          "type": "Link",
          "href": "http://pasture-one-actor/images/006c.png"
        }
      ]
    }
  }
}

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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/bOQg8aeIt3I",
  "published": "2024-10-29T14:27:15Z",
  "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/rsQ63NZx4p8",
    "published": "2024-10-29T14:27:15Z",
    "cc": [],
    "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"
        }
      ]
    }
  }
}