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.

Objects

Object 1

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Document",
    "url": "http://pasture-one-actor/images/001.png"
  },
  "attributedTo": "http://actor.example",
  "content": "Format png",
  "id": "http://actor.example/-BdBxQIaTok",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 2

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "mediaType": "image/png",
    "type": "Document",
    "url": "http://pasture-one-actor/images/001b.png"
  },
  "attributedTo": "http://actor.example",
  "content": "Format png",
  "id": "http://actor.example/_Nf2eIAJBmI",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 3

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/images/002.jpg"
  },
  "attributedTo": "http://actor.example",
  "content": "Format jpg",
  "id": "http://actor.example/IfCfX6-Dftk",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 4

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "mediaType": "image/jpeg",
    "type": "Image",
    "url": "http://pasture-one-actor/images/002b.jpg"
  },
  "attributedTo": "http://actor.example",
  "content": "Format jpg",
  "id": "http://actor.example/l0qousCO5dE",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 5

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/assets/FediverseLogo.svg"
  },
  "attributedTo": "http://actor.example",
  "content": "Format svg",
  "id": "http://actor.example/GDgY90SkACo",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 6

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/images/003.eps"
  },
  "attributedTo": "http://actor.example",
  "content": "Format eps",
  "id": "http://actor.example/9vZtVX4TVqk",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 7

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/images/003b.gif"
  },
  "attributedTo": "http://actor.example",
  "content": "Format gif",
  "id": "http://actor.example/v8O9YAQXqeI",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 8

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/images/003c.tiff"
  },
  "attributedTo": "http://actor.example",
  "content": "Format tiff",
  "id": "http://actor.example/tQZkHPqZ6dE",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 9

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": "http://pasture-one-actor/images/003d.webp"
  },
  "attributedTo": "http://actor.example",
  "content": "Format webp",
  "id": "http://actor.example/kApyDdoDu2U",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 10

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Document",
    "url": "http://pasture-one-actor/assets/does_not_exist.png"
  },
  "attributedTo": "http://actor.example",
  "content": "url does not exit",
  "id": "http://actor.example/THBV4390Uvw",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 11

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "height": 17,
    "type": "Document",
    "url": "http://pasture-one-actor/images/004.png",
    "width": 13
  },
  "attributedTo": "http://actor.example",
  "content": "Wrong height / width",
  "id": "http://actor.example/p2evi-mcUWA",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 12

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "url": "http://pasture-one-actor/images/005.png"
  },
  "attributedTo": "http://actor.example",
  "content": "No type",
  "id": "http://actor.example/CxxNlAQHE6I",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 13

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": {
      "href": "http://pasture-one-actor/images/006.png",
      "type": "Link"
    }
  },
  "attributedTo": "http://actor.example",
  "content": "url is Link object",
  "id": "http://actor.example/qNnygSb1KGg",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 14

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": {
      "href": "http://pasture-one-actor/images/006b.png",
      "mediaType": "image/png",
      "type": "Link"
    }
  },
  "attributedTo": "http://actor.example",
  "content": "url is Link object with media type",
  "id": "http://actor.example/4l2v5PLrh-M",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 15

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": [
      {
        "href": "http://pasture-one-actor/images/006c.png",
        "type": "Link"
      }
    ]
  },
  "attributedTo": "http://actor.example",
  "content": "url is Link object in an array",
  "id": "http://actor.example/msLKgM3_hu0",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Object 16

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "attachment": {
    "type": "Image",
    "url": [
      {
        "href": "http://pasture-one-actor/images/007.png",
        "mediaType": "image/png",
        "type": "Link"
      },
      {
        "href": "http://pasture-one-actor/images/008.jpg",
        "mediaType": "image/jpeg",
        "type": "Link"
      }
    ]
  },
  "attributedTo": "http://actor.example",
  "content": "url is array of two Link objects",
  "id": "http://actor.example/LPm_2Hr2_CY",
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public"
  ],
  "type": "Note"
}

Activities

Activity 1

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/9HMsU39Otw8",
  "object": {
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001.png"
    },
    "attributedTo": "http://actor.example",
    "content": "Format png",
    "id": "http://actor.example/p9gPDuQABMI",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 2

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/1PyA0Yed8n8",
  "object": {
    "attachment": {
      "mediaType": "image/png",
      "type": "Document",
      "url": "http://pasture-one-actor/images/001b.png"
    },
    "attributedTo": "http://actor.example",
    "content": "Format png",
    "id": "http://actor.example/widmkTmibvI",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 3

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/0EINnJBCmqc",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002.jpg"
    },
    "attributedTo": "http://actor.example",
    "content": "Format jpg",
    "id": "http://actor.example/j2WU79rH-uI",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 4

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/Y9SRzRiH5S0",
  "object": {
    "attachment": {
      "mediaType": "image/jpeg",
      "type": "Image",
      "url": "http://pasture-one-actor/images/002b.jpg"
    },
    "attributedTo": "http://actor.example",
    "content": "Format jpg",
    "id": "http://actor.example/lZ5YlM7RdmI",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 5

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/fFYt6oD8Ykg",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/assets/FediverseLogo.svg"
    },
    "attributedTo": "http://actor.example",
    "content": "Format svg",
    "id": "http://actor.example/b1KRjnuutn0",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 6

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/_Voog1IgsNQ",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003.eps"
    },
    "attributedTo": "http://actor.example",
    "content": "Format eps",
    "id": "http://actor.example/Qw-aLhhIS9k",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 7

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/Ifo2bOkjgRw",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003b.gif"
    },
    "attributedTo": "http://actor.example",
    "content": "Format gif",
    "id": "http://actor.example/Uyf4RjFC5XA",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 8

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/rf2ap1dQvrA",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003c.tiff"
    },
    "attributedTo": "http://actor.example",
    "content": "Format tiff",
    "id": "http://actor.example/QkOVC2U_ioc",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 9

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/JYQKxezNyK8",
  "object": {
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003d.webp"
    },
    "attributedTo": "http://actor.example",
    "content": "Format webp",
    "id": "http://actor.example/alXLn234cMU",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 10

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/aP8_tVXnY2o",
  "object": {
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/assets/does_not_exist.png"
    },
    "attributedTo": "http://actor.example",
    "content": "url does not exit",
    "id": "http://actor.example/UrzOQ6sAsto",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 11

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/UZHK3GwKZwI",
  "object": {
    "attachment": {
      "height": 17,
      "type": "Document",
      "url": "http://pasture-one-actor/images/004.png",
      "width": 13
    },
    "attributedTo": "http://actor.example",
    "content": "Wrong height / width",
    "id": "http://actor.example/-RmDTQiYLQI",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 12

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/qd1XFj5ZekM",
  "object": {
    "attachment": {
      "url": "http://pasture-one-actor/images/005.png"
    },
    "attributedTo": "http://actor.example",
    "content": "No type",
    "id": "http://actor.example/uAZ5GJ0LvjY",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 13

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/QVfnZeSdYGI",
  "object": {
    "attachment": {
      "type": "Image",
      "url": {
        "href": "http://pasture-one-actor/images/006.png",
        "type": "Link"
      }
    },
    "attributedTo": "http://actor.example",
    "content": "url is Link object",
    "id": "http://actor.example/uJFGoVtU8DM",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 14

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/fKfVMbc_J0w",
  "object": {
    "attachment": {
      "type": "Image",
      "url": {
        "href": "http://pasture-one-actor/images/006b.png",
        "mediaType": "image/png",
        "type": "Link"
      }
    },
    "attributedTo": "http://actor.example",
    "content": "url is Link object with media type",
    "id": "http://actor.example/I9-xjQTOJes",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 15

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/KEr7SujdBu8",
  "object": {
    "attachment": {
      "type": "Image",
      "url": [
        {
          "href": "http://pasture-one-actor/images/006c.png",
          "type": "Link"
        }
      ]
    },
    "attributedTo": "http://actor.example",
    "content": "url is Link object in an array",
    "id": "http://actor.example/JA_680cK3KQ",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 16

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/RIfAuMYztxw",
  "object": {
    "attachment": {
      "type": "Image",
      "url": [
        {
          "href": "http://pasture-one-actor/images/007.png",
          "mediaType": "image/png",
          "type": "Link"
        },
        {
          "href": "http://pasture-one-actor/images/008.jpg",
          "mediaType": "image/jpeg",
          "type": "Link"
        }
      ]
    },
    "attributedTo": "http://actor.example",
    "content": "url is array of two Link objects",
    "id": "http://actor.example/o_3A3dUGTno",
    "published": "2025-01-13T19:51:01Z",
    "to": [
      "as:Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-01-13T19:51:01Z",
  "to": [
    "as:Public",
    "http://remote.example/"
  ],
  "type": "Create"
}