FEP-1311: Media Attachments

This is the discussion topic for

Media Attachments are ubiquitous in the Fediverse. My quick investigation into the explore tab on mastodon.social yields that about half the posts contain an image attachment. The mechanism for these is poorly documented. For example, it is not mentioned in ActivityPub.

My goal in this FEP is to document current usage, and issue recommendations on how to improve it. These recommendations are based on the support table Recommended Media Attachment Format available at FunFedi.dev.

For developers that enjoy making their keyboards smoke, I believe that the above link combined with the content of Testing should be enough to adapt their Fediverse applications. The other parts are meant for people, who which to improve the situation related to media attachments.

Todos

  • Add “How to embed media into an Article” as an open question. Using an <img> tag is obviously not enough, because you are referring an attachment and not a web resource. This in particular means that Article should not be used until this issue is resolved.
  • Address how this is extensible, e.g. one can add properties to the media objects. One can add different things to attachments, e.g. a link.
  • Discuss updating the url
2 Likes

An erratum has been proposed that moves the width and height to the url property in AS example: Erratum for Example 79 to correct `width` and `height` properties by evanp · Pull Request #630 · w3c/activitystreams · GitHub

I’m very ambivalent on this pull requests:

  • :+1: Yes! It makes ActivityStreams more self consistent.
  • :-1: No!!! This moves ActivityStreams further away from describing the Fediverse and actually suggests something that will be incompatible with current implementations.

https://data.funfedi.dev/0.1.12/mastodon__v4.3.2/image_attachments/#example-13

shows that Mastodon doesn’t even parse an object containing the now suggested format.

One can find more details on

If someone involved with the SocialCG would like to have a work item to do better on, this would be a good one. There’s unfortunately not a discourse group for me to tag.

1 Like