From 66c5cc637f118add2d2cade2210d21da7e25917b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 27 Oct 2024 19:43:43 -0400 Subject: [PATCH 1/6] Instagram feeds --- 68.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 68.md diff --git a/68.md b/68.md new file mode 100644 index 0000000..22509e0 --- /dev/null +++ b/68.md @@ -0,0 +1,70 @@ +NIP-68 +====== + +Picture-first feeds +------------------- + +`draft` `optional` + +This NIP defines event kind `20` for picture-first clients. Images must be self-contained. They are hosted externally and referenced using `imeta` tags + +Unlike a `kind 1` event with a pircture attached, Picture events are meant to contain all additional metadata concerning the subject media and to be surfaced in picture-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Instagram/Flickr/Snapshat/9gag like nostr client where the picture itself is at the center of the experience. + +## Picture Events + +Picture events contain a `title` tag and description in the `.content`. + +They may contain multiple images to be displayed as a single post. + +```jsonc +{ + "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, + "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, + "created_at": , + "kind": 20, + "content": "", + "tags": [ + ["title", ""], + + // Picture Data + [ + "imeta", + "url https://nostr.build/i/my-image.jpg", + "m image/jpeg", + "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 ", + "fallback https://nostrcheck.me/alt1.jpg", + "fallback https://void.cat/alt1.jpg" + ], + [ + "imeta", + "url https://nostr.build/i/my-image2.jpg", + "m image/jpeg", + "blurhash eVF$^OI:${M{o#*0-nNFxakD-?xVM}WEWB%iNKxvR-oetmo#R-aen$", + "dim 3024x4032", + "alt Another scenic photo overlooking the coast of Costa Rica", + "x ", + "fallback https://nostrcheck.me/alt2.jpg", + "fallback https://void.cat/alt2.jpg", + + "annotate-user <32-bytes hex of a pubkey>::" // Tag users in specific locations in the picture + ], + + ["content-warning", ""], // if NSFW + + // Tagged users + ["p", "<32-bytes hex of a pubkey>", ""], + ["p", "<32-bytes hex of a pubkey>", ""], + + // Hashtags + ["t", ""], + ["t", ""], + ] +} +``` + +The `imeta` tag `annotate-user` places a user link in the specific position in the image. + +Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed. \ No newline at end of file From 9517ac6f5dfac58bd7237777680c557bd518dc84 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 27 Oct 2024 20:30:27 -0400 Subject: [PATCH 2/6] Enforces certain media types --- 68.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/68.md b/68.md index 22509e0..dcc56f1 100644 --- a/68.md +++ b/68.md @@ -58,6 +58,9 @@ They may contain multiple images to be displayed as a single post. ["p", "<32-bytes hex of a pubkey>", ""], ["p", "<32-bytes hex of a pubkey>", ""], + // Specify the media type for filters to allow clients to filter by supported kinds + ["m", "image/jpeg"] + // Hashtags ["t", ""], ["t", ""], @@ -67,4 +70,12 @@ They may contain multiple images to be displayed as a single post. The `imeta` tag `annotate-user` places a user link in the specific position in the image. +Only the following media types are accepted: +- `image/apng`: Animated Portable Network Graphics (APNG) +- `image/avif`: AV1 Image File Format (AVIF) +- `image/gif`: Graphics Interchange Format (GIF) +- `image/jpeg`: Joint Photographic Expert Group image (JPEG) +- `image/png`: Portable Network Graphics (PNG) +- `image/webp`: Web Picture format (WEBP) + Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed. \ No newline at end of file From 5c7aad212ea44605d64e360be89ea5a1d843a3f8 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 28 Oct 2024 15:51:54 -0400 Subject: [PATCH 3/6] Adds language tag for images that contain text. --- 68.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/68.md b/68.md index dcc56f1..0ba4459 100644 --- a/68.md +++ b/68.md @@ -64,6 +64,10 @@ They may contain multiple images to be displayed as a single post. // Hashtags ["t", ""], ["t", ""], + + // When text is written in the image, add the tag to represent the language + ["L", "ISO-639-1"], + ["l", "en", "ISO-639-1"] ] } ``` From 82291c6afda8498ac6f4ddb1d14289f9edb8f8ae Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 30 Oct 2024 11:50:21 -0400 Subject: [PATCH 4/6] adds location --- 68.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/68.md b/68.md index 0ba4459..8a87848 100644 --- a/68.md +++ b/68.md @@ -65,6 +65,10 @@ They may contain multiple images to be displayed as a single post. ["t", ""], ["t", ""], + // location + ["location", ""], // city name, state, country + ["g", ""], + // When text is written in the image, add the tag to represent the language ["L", "ISO-639-1"], ["l", "en", "ISO-639-1"] From a8dfdff753a30f0845d6b9729cdbae3ad37a3f8e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 15 Nov 2024 08:15:30 -0500 Subject: [PATCH 5/6] Adds x tag to index by sha256 Co-authored-by: Pablo Fernandez --- 68.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/68.md b/68.md index 8a87848..2950712 100644 --- a/68.md +++ b/68.md @@ -59,7 +59,8 @@ They may contain multiple images to be displayed as a single post. ["p", "<32-bytes hex of a pubkey>", ""], // Specify the media type for filters to allow clients to filter by supported kinds - ["m", "image/jpeg"] + ["m", "image/jpeg"], + ["x", ""] // Hashtags ["t", ""], From dfd2c2b8ca86821485f9bbcd3b1397e211c294e5 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 15 Nov 2024 08:28:54 -0500 Subject: [PATCH 6/6] Minor changes to simplify the text --- 68.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/68.md b/68.md index 2950712..6c1e7d2 100644 --- a/68.md +++ b/68.md @@ -6,9 +6,9 @@ Picture-first feeds `draft` `optional` -This NIP defines event kind `20` for picture-first clients. Images must be self-contained. They are hosted externally and referenced using `imeta` tags +This NIP defines event kind `20` for picture-first clients. Images must be self-contained. They are hosted externally and referenced using `imeta` tags. -Unlike a `kind 1` event with a pircture attached, Picture events are meant to contain all additional metadata concerning the subject media and to be surfaced in picture-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Instagram/Flickr/Snapshat/9gag like nostr client where the picture itself is at the center of the experience. +The idea is for this type of event to cater to Nostr clients resembling platforms like Instagram, Flickr, Snapchat, or 9GAG, where the picture itself takes center stage in the user experience. ## Picture Events @@ -60,6 +60,8 @@ They may contain multiple images to be displayed as a single post. // Specify the media type for filters to allow clients to filter by supported kinds ["m", "image/jpeg"], + + // Hashes of each image to make them queryable ["x", ""] // Hashtags @@ -87,4 +89,4 @@ Only the following media types are accepted: - `image/png`: Portable Network Graphics (PNG) - `image/webp`: Web Picture format (WEBP) -Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed. \ No newline at end of file +Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed.