← Todos los NIPs

NIP-92

Metadatos de archivos adjuntos (imeta)

BorradorEventos

Cuando una nota enlaza una imagen o un video, una etiqueta imeta describe ese archivo (tipo, tamaño, dimensiones, hash, texto alternativo) para que los clientes muestren una buena vista previa antes de descargarlo.

De un vistazo

Estado
En uso, pero todavía puede cambiar.
Tags
  • imeta
Último cambio
2 jun 2026

Pruébalo

Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.

Ejemplos
Válido 1 nota

Aún sin firmar · Solo claves de demo. Las claves secretas de estos personajes son públicas a propósito.

Formulario
1 ene 2025, 0:00 UTC

Contenido

El texto de la nota, incluida cada URL de archivo.

Tags

  1. imeta Recomendado

    Metadatos de una URL que aparece en content.

Añadir tag

Cómo funciona este NIP

Paso 1 de 4

Pon la URL en el texto

La URL del archivo se queda en content, así cualquier cliente puede seguir mostrando un enlace simple.

En el curso

Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.

Se basa en

Usado por

Ver también

Especificación

El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368

Leer la especificación226 palabras, citadas del repositorio en el commit 0046368.

Media attachments (images, videos, and other files) may be added to events by including a URL in the event content, along with a matching imeta tag.

imeta ("inline metadata") tags MAY add information about media URLs in the event's content. Each imeta tag SHOULD match a URL in the event content. Clients MAY replace imeta URLs with rich previews.

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. There SHOULD be only one imeta tag per URL.

Example

{
  "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",
      "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 <sha256 hash as specified in NIP 94>",
      "fallback https://nostrcheck.me/alt1.jpg",
      "fallback https://void.cat/alt1.jpg"
    ]
  ]
}

When uploading files during a new post, clients MAY include this metadata after the file is uploaded and included in the post.

When pasting URLs during post composition, the client MAY download the file and add this metadata before the post is sent.

The client MAY ignore imeta tags that do not match the URL in the event content.