draft
optional
author:alexgleason
Media attachments may be added to events with the "media"
tag, in the form:
["media", <url>, <data, optional>]
Where:
<url>
is the URL of the media file.<data>
(optional) is a stringified JSON object containing metadata about the media file.
The data
field may contain any of the keys listed as tags in NIP-94. For example, ["m", "image/png"]
would become {"m": "image/png"}
in the data
field.
Clients will typically display media attachments as thumbnail previews, separate from the content of the event.
Relays are not expected to index this tag.
{
"kind": 1,
"content": "Been goin hard on the Open Source Software.",
"tags": [
[
"media",
"https://media.gleasonator.com/074862413a7fe1d18a2bee0f626280c8f795b392e9400419cc34ca4f3cb560ee.png",
"{\"m\":\"image/png\",\"dim\":\"1342x704\",\"blurhash\":\"MnR3f,%M%2%MjZ~Wj@j[t7Rjs:ayfkj[WB\"}"
]
],
"pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",
"created_at": 1691091365,
// ...
}