Inline resource metadata is additional information associated with urls in notes that clients can optionally use to enhance resource loading.
It uses [URI Fragment](https://en.wikipedia.org/wiki/URI_fragment) that agents (such as web browsers) never send to the server.
The URI fragment follows [media fragments structure](https://www.w3.org/TR/media-frags/#general-structure). For example, one could use `t=number_of_seconds` to start playing a video at the specified position along with an extra [percent-encoded](https://www.ietf.org/rfc/rfc3986.txt) name-value pair separated by `&` char like `https://xyz.com/a-video.mp4#t=24&a%20name=a%20value`.
Besides available w3c and proprietary URI fragment usage, nostr uses existing [NIP-94](94.md) tags as file fragment name-value pairs. NIP-94 event `.content` is equivalent to `alt` fragment field. For example, one could join the following strings to form an image url with inline metadata:
Multiple array values use repeated names and are positioned in the same order of ocurrence in the tag array. For instance, `["aes-256-gcm", 'i-am-a-key', 'i-am-an-iv']` becomes `aes-256-gcm=i-am-a-key&aes-256-gcm=i-am-an-iv`
Metadata fragments are great for sharing urls with extra embedded metadata. They are also good for copying and pasting a resource's url from one note to a new one without losing its metadata.
But some clients can prepare image and video placeholders faster if specific fields are present outside of `.content`.
For these resources, it is suggested to also add `dim`, `alt` and `blurhash` (e.g. of a specific video frame), if available, to `imeta` tags.
### Complete example:
```js
{
"kind": 1,
"content": "What a great place! https://xyz.com/example.jpg#dim=3024x4032&alt=A%20scenic%20photo%20overlooking%20the%20coast%20of%20Costa%20Rica&blurhash=eVF%24%5EOI%3A%24%7BM%7Bo%23*0-nNFxakD-%3FxVM%7DWEWB%25iNKxvR-oetmo%23R-aen%24`",
"tags": [
[
"imeta",
"url https://xyz.com/example.jpg",
"dim 3024x4032",
"alt A scenic photo overlooking the coast of Costa Rica",