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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/CI0E9KCdcKY",
  "published": "2025-01-14T15:47:55Z",
  "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/ZMTey6xmaBY",
    "published": "2025-01-14T15:47:55Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/DMSG5Ek3y8k",
  "published": "2025-01-14T15:48: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/vyDXNSB7BVo",
    "published": "2025-01-14T15:48:10Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/a3hZjlN6qrc",
  "published": "2025-01-14T15:48: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/ECIwL-AAjts",
    "published": "2025-01-14T15:48:25Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/2D7AWdtzm78",
  "published": "2025-01-14T15:48:39Z",
  "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/bVZWiRgScZs",
    "published": "2025-01-14T15:48:39Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/u7SB81DP-fs",
  "published": "2025-01-14T15:48:54Z",
  "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/eIWuxOVdHTg",
    "published": "2025-01-14T15:48:54Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/4eLAPodHIyo",
  "published": "2025-01-14T15:49:09Z",
  "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/6RXJy5X9Uno",
    "published": "2025-01-14T15:49:09Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/tUabKxOQPy0",
  "published": "2025-01-14T15:49:24Z",
  "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/hL8RHj02ZAg",
    "published": "2025-01-14T15:49:24Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/7fNGssh-y8I",
  "published": "2025-01-14T15:49:39Z",
  "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/GN-H_u_kV-U",
    "published": "2025-01-14T15:49:39Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/lOwUMWOswPE",
  "published": "2025-01-14T15:49:54Z",
  "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/_oD7nRxpOeA",
    "published": "2025-01-14T15:49:54Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/s7b5S2hcE-s",
  "published": "2025-01-14T15:50:09Z",
  "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/Zh31NN95EVY",
    "published": "2025-01-14T15:50:09Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/Gw7vAFNzLEo",
  "published": "2025-01-14T15:50:24Z",
  "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/oMb_AYtyZGI",
    "published": "2025-01-14T15:50:24Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/xpO5Q6uUrV8",
  "published": "2025-01-14T15:50:39Z",
  "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/XdPizW841mw",
    "published": "2025-01-14T15:50:39Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/PPPt--7cngE",
  "published": "2025-01-14T15:50: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/30mKWAZekUk",
    "published": "2025-01-14T15:50:53Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/HGQm9mkZ4Nw",
  "published": "2025-01-14T15:51: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/6ipCLjgb2kE",
    "published": "2025-01-14T15:51:08Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/Npr1QTv__Bg",
  "published": "2025-01-14T15:51: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/5nrGPDhJQ3o",
    "published": "2025-01-14T15:51:23Z",
    "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": [
    "http://mbin/u/oscar",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/actor/009nmKD_sa0",
  "published": "2025-01-14T15:51: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/JEbJMkeERIk",
    "published": "2025-01-14T15:51:38Z",
    "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": []
  }
}