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.
Yes! It makes ActivityStreams more self consistent.
No!!! This moves ActivityStreams further away from describing the Fediverse and actually suggests something that will be incompatible with current implementations.
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.
This is a good idea as a FEP, but currently every UGC attachment in the fediverse is almost always distributed as a Document, here’s some data from an early preview of @darius’s wonderful Fediverse Observatory project
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.
If the attachment has a name, you could specify the embedded attachment with a local tag, like: <img src="#the image name">.
Alternatively, since each image has an url, you could use that (exact) url, and let clients match the image sources to urls in the attachments.
The open question is not how to possibly implement this, but to define a standard accepted by the Fediverse. This means that a sufficient number of implementations support it.