Quick Start
Drop this into the<head> of a page, and you get a preview with your site name, a linked title, a description, an accent color, and a large image below the text.

How Discord Reads Your Page
Discord makes a singleGET request for the URL that was shared and parses the HTML that comes back. Your page has to meet all of the following for a preview to appear:
- An HTML page served over HTTP or HTTPS.
- The tags must be in the HTML your server sends. No code is executed, so tags added by a client-side script after load are never seen.
- The response must be a 2xx.
- Content type of
text/htmlorapplication/xhtml+xml, and not served as a download withContent-Disposition: attachment. - At most 5 redirects.
- At most 50 MB of data returned.
- The whole fetch, including measuring your images and video, must finish within 10 seconds.
Tag Reference
For each tag:- The key comes from
nameif present, otherwise fromproperty. - The value comes from
contentif present, otherwise fromvalue. - Key names are case-sensitive.
- When several tags map to the same field, the first non-empty one wins for the title, description, and site name. For layout, color, and date tags, the last one in the document wins.
Preview Layouts
The tags you set decide which embed layout is chosen.
When setting title, description, and one image, with no layout tags you'll see text with a small image.

When twitter:card is set to summary_large_image you'll see text with a large image below it.

When twitter:card is set to photo, or the shared URL points straight at an image file, you'll see the image on its own, with no description.

When `og:type` is set to `video.other` or `twitter:card` is set to `player`, plus a video file, you'll see an inline video player using `og:image` as the preview frame, with no description.

When there are two or more og:image tags you'll see a gallery of up to 4 images.

When og:type is set to rich you'll see Discord rendered markdown text with a small thumbnail.
Images
- Supported formats are
.png,.gif,.jpg,.jpeg,.webp, and.avif. - Provide
og:image:widthandog:image:height. Without them, Discord fetches the image to measure it. - Relative URLs must start with
/. - Dimension, type, and alt tags attach to
og:imageandtwitter:imageonly. They are not read forog:image:url,og:image:secure_url, ortwitter:image:src, so use the plain tag names when you want to declare dimensions. - Two or more
og:imagetags produce a gallery. At most 4 images are shown. - Sharing a URL that points straight at an image file produces an image preview with no metadata required.
Video
- Supported formats are
.mp4,.webm, and.mov. - Point the
og:videotag directly at the video file. - Set
og:typetovideoorvideo.*. Or settwitter:cardtoplayer. og:imageis required to render the video and it becomes the preview frame.- Serve the file over
https. - Discord measures the file to size the player, so
og:video:widthandog:video:heightare optional. If the file cannot be measured and no dimensions are declared, the video is dropped and the layout falls back to a plain link preview.
oEmbed
Discord supports oEmbed in JSON only, discovered through a link tag in your document:<meta> tags already said. These fields are used:
html, url, width, height, and cache_age are ignored. Errors fetching or parsing the oEmbed document are ignored too.
Accent Color and Publish Date
theme-color sets the accent color of the preview, and it has to be a 6 or 8 digit hex value:
Limits
og:type rich previews, the description is rendered as Discord markdown instead.
Caching and Testing
Discord caches previews for about 30 minutes. While a preview is cached, editing your tags and resharing the same URL shows the old card. To see changes immediately, share the URL with a new query string, such as?v=2.
You can also use the Embed Debugger which shows how Discord reads a URL, including which tags it picked up and which layout it chose.