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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/Rgyvd_YYp0g",
  "published": "2025-01-24T08:16:21Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/H4DmMMKCSBI",
    "published": "2025-01-24T08:16:21Z",
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001.png"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/Gpibod_BuxQ",
  "published": "2025-01-24T08:16:32Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/U5Jd4M729-E",
    "published": "2025-01-24T08:16:32Z",
    "content": "Format png",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/images/001b.png",
      "mediaType": "image/png"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/U4PMB1z2BS0",
  "published": "2025-01-24T08:16:44Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/qr-nhgCYP8g",
    "published": "2025-01-24T08:16:44Z",
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002.jpg"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/O7wfsX3w3TY",
  "published": "2025-01-24T08:16:56Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/iC5uNyhScp8",
    "published": "2025-01-24T08:16:56Z",
    "content": "Format jpg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/002b.jpg",
      "mediaType": "image/jpeg"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/zpAG9SDgpY4",
  "published": "2025-01-24T08:17:08Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/YIEjxChrr9Y",
    "published": "2025-01-24T08:17:08Z",
    "content": "Format svg",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/assets/FediverseLogo.svg"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/nXHLlSO873c",
  "published": "2025-01-24T08:17:20Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/sWEbQs-1Sd8",
    "published": "2025-01-24T08:17:20Z",
    "content": "Format eps",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003.eps"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/AYGfnbH9VnM",
  "published": "2025-01-24T08:17:32Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/BCAOiWx8wkQ",
    "published": "2025-01-24T08:17:32Z",
    "content": "Format gif",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003b.gif"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/juvzTEtEqwc",
  "published": "2025-01-24T08:17:44Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/5Pg4C0evB_s",
    "published": "2025-01-24T08:17:44Z",
    "content": "Format tiff",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003c.tiff"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/1_WqNEGWIIE",
  "published": "2025-01-24T08:17:56Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/rn4mMc18uzA",
    "published": "2025-01-24T08:17:56Z",
    "content": "Format webp",
    "attachment": {
      "type": "Image",
      "url": "http://pasture-one-actor/images/003d.webp"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/ZQASbEWpcJo",
  "published": "2025-01-24T08:18:08Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/kBHeDjGiDIA",
    "published": "2025-01-24T08:18:08Z",
    "content": "url does not exit",
    "attachment": {
      "type": "Document",
      "url": "http://pasture-one-actor/assets/does_not_exist.png"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/8yOgpgOduzY",
  "published": "2025-01-24T08:18:20Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/PS_ZX8uWzjQ",
    "published": "2025-01-24T08:18:20Z",
    "content": "Wrong height / width",
    "attachment": {
      "type": "Document",
      "width": 13,
      "height": 17,
      "url": "http://pasture-one-actor/images/004.png"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/Stc-xUOQaYg",
  "published": "2025-01-24T08:18:32Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/McwpsB4eORE",
    "published": "2025-01-24T08:18:32Z",
    "content": "No type",
    "attachment": {
      "url": "http://pasture-one-actor/images/005.png"
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/lfaevoy9dGA",
  "published": "2025-01-24T08:18:44Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/27GHx1VAg_A",
    "published": "2025-01-24T08:18:44Z",
    "content": "url is Link object",
    "attachment": {
      "type": "Image",
      "url": {
        "type": "Link",
        "href": "http://pasture-one-actor/images/006.png"
      }
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/wIHdF8_ifkU",
  "published": "2025-01-24T08:18:56Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/vd8RDNT7VeQ",
    "published": "2025-01-24T08:18:56Z",
    "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"
      }
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/ibQfv_wwx3k",
  "published": "2025-01-24T08:19:08Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/3cW7I-j61kA",
    "published": "2025-01-24T08:19:08Z",
    "content": "url is Link object in an array",
    "attachment": {
      "type": "Image",
      "url": [
        {
          "type": "Link",
          "href": "http://pasture-one-actor/images/006c.png"
        }
      ]
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/actor/Xi5blIF6bV8",
  "published": "2025-01-24T08:19:20Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/actor/__uVCyJDhsI",
    "published": "2025-01-24T08:19:20Z",
    "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"
        }
      ]
    },
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}