upleb.uk

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

summaryrefslogtreecommitdiff
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
parentffef063a44cc1431da39b9fe145bf2a8ff84f302 (diff)
parent2c016b0659a8f29ad2420a4cd844a2dca4956407 (diff)
Merge pull request #904 from coracle-social/imeta
Add imeta tag
-rw-r--r--29.md43
-rw-r--r--94.md1
2 files changed, 44 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.
diff --git a/94.md b/94.md
index eb8117a..e35dfa1 100644
--- a/94.md
+++ b/94.md
@@ -25,6 +25,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
25* `image` (optional) url of preview image with same dimensions 25* `image` (optional) url of preview image with same dimensions
26* `summary` (optional) text excerpt 26* `summary` (optional) text excerpt
27* `alt` (optional) description for accessibility 27* `alt` (optional) description for accessibility
28* `fallback` (optional) zero or more fallback file sources in case `url` fails
28 29
29```json 30```json
30{ 31{