-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jon Staab
committed
Feb 1, 2024
1 parent
735134a
commit 2c016b0
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
NIP029 | ||
====== | ||
|
||
imeta | ||
-------------- | ||
|
||
`imeta` is a tag for adding media attachments to events. `imeta` tags MUST match URLs | ||
in the event content. Clients may replace imeta URLs with rich previews. `imeta` tags | ||
contain extra information about the media attachment, which clients can use to provide | ||
a better experience when loading images. | ||
|
||
The `imeta` tag is variadic, and each entry is a space-delimited key/value pair. | ||
Each `imeta` tag MUST have a `url`, and at least one other field. `imeta` may include | ||
any field specified by [NIP 94](./94.md). There SHOULD be only one `imeta` tag per url. | ||
|
||
## Example | ||
|
||
```json | ||
{ | ||
"content": "More image metadata tests don’t mind me https://nostr.build/i/my-image.jpg", | ||
"kind": 1, | ||
"tags": [ | ||
[ | ||
"imeta", | ||
"url https://nostr.build/i/my-image.jpg", | ||
"blurhash eVF$^OI:${M{o#*0-nNFxakD-?xVM}WEWB%iNKxvR-oetmo#R-aen$", | ||
"dim 3024x4032", | ||
"alt A scenic photo overlooking the coast of Costa Rica", | ||
"x <sha256 hash as specified in NIP 94>", | ||
"fallback https://nostrcheck.me/alt1.jpg" | ||
"fallback https://void.cat/alt1.jpg" | ||
] | ||
] | ||
} | ||
``` | ||
|
||
## Recommended client behavior | ||
|
||
When uploading images during a new post, clients MAY include this metadata | ||
after the image is uploaded and included in the post. | ||
|
||
When pasting urls during post composition, the client MAY download the image | ||
and add this metadata before the post is sent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters