It is common in many chat systems to show a "link preview" or other metadata about IRIs in or related to a message. This metadata is commonly generated from the resource that can be retreived from the resource that can be found at the IRI, for example if it is an HTTPS URL there are three common ways to get this metadata:
The first option does not require specification and is entirely client-side by the recipient. This specification defines a format for injection in the other two cases.
When an entity wishes to add metadata describing an IRI to a message, they first must generate this metadata somehow. This is out of scope for this document. After this is done they append to the message stanza a child <Description> in namespace http://www.w3.org/1999/02/22-rdf-syntax-ns# which MUST have a namespaced attribute about in the same namespace (MUST have a specified namespace). The about attribute specifies what IRI this metadata is about.
Inside the <Description> element there may be any elements in any namespaces (RDF/XML [1]-compatible namespaces suggested), in order to allow for extensible metadata about this IRI.
One very useful vocabulary for use in this context which SHOULD be supported is OpenGraph [2] which uses namespace https://ogp.me/ns#.
<message to='romeo@montague.lit' type='chat'>
<body>I wanted to mention https://the.link.example.com/what-was-linked-to</body>
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:og="https://ogp.me/ns#" rdf:about="https://the.link.example.com/what-was-linked-to">
<og:title>The Best Webpage</og:title>
<og:description>This is a great webpage and you will really like it</og:description>
<og:url>https://example.com/canonical-url/for/what-was-linked-to</og:url>
<og:image>https://link.to.example.com/image.png</og:image>
<og:image>cid:sha-256+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855@bob.xmpp.org</og:image>
<og:image>ni:///shai-256;47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU</og:image>
<og:image>data:image/jpeg,...</og:image>
<og:video>https://videos.example.com/video-embed.html</og:video>
<og:type>website</og:type>
<og:site_name>Example Website</og:site_name>
</rdf:Description>
</message>Depends on the metadata, but in general all metadata should be considered to create a UX that is accesibile (eg: not showing only the image).
Metadata will often be in the same language as the resource being described. If metadata in multiple languages is available, and implemenation MAY inject both in separate <Description> with the same about and differing xml:lang.
Resolving, fetching, or interpreting remote resources may be fraught with security issues. Care should be taken to fetch and interpret a limited amount of data in a safe and structured way if necessary to produce the metadata.
Fetching a remote resource may reveal interest on the part of an IP address, similar to clicking on a link. Recipients should not fetch remote resources of any kind without user intervention. Senders should be aware that generating this metadata may confer the same privacy result as opening the link they are sending.
None.
None.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
1. RDF/XML: https://www.w3.org/TR/rdf-syntax-grammar/
2. OpenGraph: https://ogp.me/
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
First draft.
@report{weber2026link-metadata,
title = {Link Metadata},
author = {Weber, Stephen Paul},
type = {XEP},
number = {xxxx},
version = {0.0.1},
institution = {XMPP Standards Foundation},
url = {https://xmpp.org/extensions/xep-xxxx.html},
date = {2026-01-30/2026-01-30},
}END