/me wonders why uses the `Document` object type for image attachments, instead of the `Image` object type?

/me wonders if he sends an Image instead of a Document, whether many platforms will accept it 🤔

Yes I know isn't "the ActivityPub", but it's something I still want to federate with :P

@jaywink attachments don't have to be images? Simpler to pick a type and stick with it. Not sure how useful that information really is.

@tedu But if an attachment *is clearly an image*, it seems odd to use the more generic Document type (which is the super class of Image). I don't know, just asking because testing against I was just surprised. Maybe there is a reason.

@liaizon Yeah! Missing mentions and a bunch of small details. Also need to test migration path from purely Diaspora profiles to ActivityPub profiles on the major platforms. Then I will switch my own profile over to ActivityPub. Hopefully within a week!

That means this account will, finally, become unnecessary ;)

@jaywink Maybe because of videos that aren't Images so to speak ?

@tcit AP also has a `Video` object that is a subtype of `Document`, just like `Image` ;)

@jaywink Found this :

Represent all attachments as Document instead of Image/Video specifically
(Because for remote ones we may not know for sure)

@tcit cool 👍 Yeah i thought there was probably a decision made due to some reason. And that is ok.

I've done it so that when one needs to send a payload with a certain content type, the CT is fetched by doing a HEAD request (with a short timeout to avoid getting bogged down) -

Not sure how 100% reliable this is, but it seems to work well enough.

I'm glad Mastodon accepts `Image` type inbound even if it uses `Document` outbound 👍

@jaywink IMHO, this is because Mastodon does not send images: it sends links to images. (I tried sending a "real" image to a Mastodon server, and it displays the base64...) #ActivityPub

@bortzmeyer Yeah the trouble is representing all possibilities, especially in a large spec (framework) like AS2/AP.

Personally, authoring a server, I would probably not support image blobs in payloads by design. It's probably something that could be useful in some applications, but for me duplicating images across with payloads sounds very wasteful. Cat pictures and memes take enough of the storage space of the internet already as it is ;) That is why we have links.

@jaywink Yes, also, image blobs are a great way to DoS a server since Mastodon does not check someone on the instance is subscribed to this actor before accepting a Create activity from him/her.

Sign in to participate in the conversation

Instance majoritairement francophone. Nous ne régulons la fédération. Aucun contenu du fédiverse n'est filtré par une décision d'administrateur ou de modérateur.