upleb.uk

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

summaryrefslogtreecommitdiff
path: root/29.md
diff options
context:
space:
mode:
authorhodlbod <jstaab@protonmail.com>2024-02-01 13:10:34 -0800
committerGitHub <noreply@github.com>2024-02-01 13:10:34 -0800
commit1ac28115eece4e0c85636ecd109ed113e9d37fd9 (patch)
tree3c9d3cc062264e3681587331a080704ea513f1bc /29.md
parentffef063a44cc1431da39b9fe145bf2a8ff84f302 (diff)
parent2c016b0659a8f29ad2420a4cd844a2dca4956407 (diff)
Merge pull request #904 from coracle-social/imeta
Add imeta tag
Diffstat (limited to '29.md')
-rw-r--r--29.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/29.md b/29.md
new file mode 100644
index 0000000..8c990bb
--- /dev/null
+++ b/29.md
@@ -0,0 +1,43 @@
1NIP029
2======
3
4imeta
5--------------
6
7`imeta` is a tag for adding media attachments to events. `imeta` tags MUST match URLs
8in the event content. Clients may replace imeta URLs with rich previews. `imeta` tags
9contain extra information about the media attachment, which clients can use to provide
10a better experience when loading images.
11
12The `imeta` tag is variadic, and each entry is a space-delimited key/value pair.
13Each `imeta` tag MUST have a `url`, and at least one other field. `imeta` may include
14any field specified by [NIP 94](./94.md). There SHOULD be only one `imeta` tag per url.
15
16## Example
17
18```json
19{
20 "content": "More image metadata tests don’t mind me https://nostr.build/i/my-image.jpg",
21 "kind": 1,
22 "tags": [
23 [
24 "imeta",
25 "url https://nostr.build/i/my-image.jpg",
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 images during a new post, clients MAY include this metadata
40after the image is uploaded and included in the post.
41
42When pasting urls during post composition, the client MAY download the image
43and add this metadata before the post is sent.