upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/92.md
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-02-01 20:59:37 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-02-01 20:59:37 -0300
commit5196ac196a9e19cfbb9c6cd16d8081dd137e3572 (patch)
treecb2bcf62e085df61091be54af8a1227b7152cbd3 /92.md
parent5e14fd7f0851779cda2adbb8fd8bac4547570b15 (diff)
move `imeta` to NIP-92, add `imeta` tag to README.
Diffstat (limited to '92.md')
-rw-r--r--92.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/92.md b/92.md
new file mode 100644
index 0000000..81d4610
--- /dev/null
+++ b/92.md
@@ -0,0 +1,43 @@
1NIP-92
2======
3
4Media Attachments
5-----------------
6
7Media attachments (images, videos, and other files) may be added to events by including a URL in the event content, along with a matching `imeta` tag.
8
9`imeta` ("inline metadata") tags add information about media URLs in the event's content. Each `imeta` tag SHOULD match a URL in the event content. Clients may replace imeta URLs with rich previews.
10
11The `imeta` tag is variadic, and each entry is a space-delimited key/value pair.
12Each `imeta` tag MUST have a `url`, and at least one other field. `imeta` may include
13any field specified by [NIP 94](./94.md). There SHOULD be only one `imeta` tag per url.
14
15## Example
16
17```json
18{
19 "content": "More image metadata tests don’t mind me https://nostr.build/i/my-image.jpg",
20 "kind": 1,
21 "tags": [
22 [
23 "imeta",
24 "url https://nostr.build/i/my-image.jpg",
25 "m image/jpeg",
26 "blurhash eVF$^OI:${M{o#*0-nNFxakD-?xVM}WEWB%iNKxvR-oetmo#R-aen$",
27 "dim 3024x4032",
28 "alt A scenic photo overlooking the coast of Costa Rica",
29 "x <sha256 hash as specified in NIP 94>",
30 "fallback https://nostrcheck.me/alt1.jpg"
31 "fallback https://void.cat/alt1.jpg"
32 ]
33 ]
34}
35```
36
37## Recommended client behavior
38
39When uploading files during a new post, clients MAY include this metadata
40after the file is uploaded and included in the post.
41
42When pasting urls during post composition, the client MAY download the file
43and add this metadata before the post is sent.