Skip to content

Link previews

Discord embed: how link previews are built and fixed

By Hannah Voss, Editor · Reviewed September 2026 · Updated · 9 min read

Quick answer

Discord builds a link embed by making one GET request to your page and reading Open Graph and Twitter tags in the HTML your server sends. Add twitter:card set to summary_large_image for a large image and theme-color for the accent color. Discord caches previews for about 30 minutes, so test a change with a new query string such as ?v=2.

A cut-paper link preview card with a grey landscape panel, two blank text bars and a small embossed seal in one corner

Two things in Discord are called embeds. When someone pastes a URL into chat, Discord fetches the page and draws a card under the message. Discord's developer docs call that card a link preview and the process unfurling. Bots and webhooks can also post embeds they build themselves from fields such as title, color and footer. The Message Resource reference lists the embed types: rich is the generic embed built from attributes, and it is always the type for webhook embeds, while link, article, image, video and gifv cover previews of links and media.

This guide is about the first kind: what your site's tags make Discord show. Nothing here needs a bot. For the same job on other networks, start at the Open Graph hub.

How does Discord read your page?

The Link Previews page in Discord's developer documentation, as published in November 2026, says Discord makes a single GET request for the shared URL and parses the HTML that comes back. A preview appears only if all of these hold:

  • The page is HTML served over HTTP or HTTPS.
  • The tags are in the HTML your server sends. No code is executed, so tags added by a script after load are never seen.
  • The response is a 2xx status.
  • The content type is text/html or application/xhtml+xml, and the page is not served as a download.
  • There are at most 5 redirects and at most 50 MB of data.
  • The whole fetch, including measuring your images and video, finishes within 10 seconds.
How Discord unfurls a link01Link pastedin chat02One GETserver HTML only03Tags parsedog, twitter04Media measured10 s budget05Embed showncached 30 min
No script runs at any step, so tags must be in the first response.

The same page does not name the user agent Discord's fetcher sends, and we did not find it in the other official pages we read. If a firewall rule is blocking previews, check your server log for the request made when you paste a link, rather than trusting a user agent string from a third party.

Which tags does Discord read?

Discord takes the key from name if present, otherwise from property, and key names are case sensitive. When several tags map to the same field, the first non-empty one wins for title, description and site name; for layout, color and date tags, the last one in the document wins.

TagEmbed fieldNotes from Discord's docs
og:title, twitter:titleTitleTrimmed past 70 bytes or 3 lines
og:description, twitter:descriptionDescriptionPlain text; trimmed past 350 bytes or 20 lines
title element plus meta descriptionTitle and descriptionUsed only as a pair, and only when no og or twitter title or description exists
og:site_nameProvider name above the titleOver 256 characters means no preview at all
og:image, twitter:imageImage or thumbnailpng, gif, jpg, jpeg, webp, avif
og:image:width, og:image:heightImage dimensionsWithout them, Discord fetches the image to measure it
twitter:cardLayoutsummary_large_image, photo and player change the layout
og:typeLayoutOnly rich, video, video.* and instapp:photo are read
theme-colorAccent color#RRGGBB or #RRGGBBAA only
og:pubdateTimestampFull RFC 3339 with time and offset
oEmbed link (JSON)Gap filler and author lineRuns after Open Graph; the only way to add an author

A head that gives a large image card with a colored accent looks like this. It mirrors the quick start block in Discord's docs, with our example values.

<meta property="og:site_name" content="Example Town Journal">
<meta property="og:title" content="Why the town clock runs slow">
<meta property="og:description" content="A 140 year old escapement and a repair that took three attempts.">
<meta property="og:image" content="https://example.com/wp-content/uploads/town-clock-1200x630.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="theme-color" content="#1F6FEB">
<meta name="twitter:card" content="summary_large_image">

Check which of these your SEO plugin already prints. theme-color is not an Open Graph tag, so it may come from your theme or from nowhere; if the theme prints one, Discord uses it. The summary_large_image card markup guide explains the twitter line, and choosing the share image size covers the 1200 by 630 crop.

What the page hasWhat Discord shows
Title, description, one image, no layout tagsText with a small image
twitter:card set to summary_large_imageText with a large image below it
twitter:card set to photo, or a URL straight to an image fileThe image on its own, no description
og:type video.other or twitter:card player, plus a video fileAn inline player using og:image as the frame
Two or more og:image tagsA gallery of up to 4 images
og:type set to richDescription rendered as Discord markdown with a small thumbnail

The second row is the one most sites want, and it is why a site with perfect Open Graph tags can still get a small thumbnail on Discord: the twitter:card line is missing.

How do you test a Discord embed?

  1. Read your own source

    Open the page logged out, view source, and search for og:, twitter:card and theme-color. To see a rendered card without posting, paste the HTML into the browser-based preview checker; it fetches nothing.

  2. Check the response

    Run curl -sI https://example.com/town-clock/. Look for a 2xx status, a text/html content type, and no Content-Disposition: attachment header.

  3. Open the Embed Debugger

    Go to discord.com/developers/embeds, the Embed Debugger linked from the Link Previews page, and paste your URL. It shows which tags Discord picked up and which layout it chose.

  4. Post with a fresh query string

    In a test channel, paste the URL with ?v=2 on the end. Discord's docs recommend this to see changes at once while the old preview is cached.

  5. Compare with the plain URL

    After about 30 minutes, paste the canonical URL without the query string and confirm it now matches.

How do you refresh a cached Discord embed?

Discord caches previews for about 30 minutes. While a preview is cached, editing your tags and sharing the same URL again shows the old card. The documented workaround is a new query string, such as ?v=2, which Discord treats as a new URL. Purge your own page cache first, or Discord will fetch the old HTML from it. Discord's docs do not say whether embeds on messages posted before the change are updated later, so do not promise that to anyone.

How do you hide or turn off embeds?

  • One link. The Help Center article How do I disable auto-embed? says to wrap the link in < >, for example <https://example.com/town-clock/>. The link stays clickable without a card.
  • For yourself. The same article says: click the User Settings cog in the bottom left, select the Text & Images tab, and uncheck When posted as links to chat and When uploaded directly to Discord. If your client does not show a Text & Images tab, look for those two checkbox labels elsewhere in User Settings.
  • From a bot. The Message Resource reference lists a SUPPRESS_EMBEDS flag. A bot can set it when creating a message, and the Edit Message endpoint can set or unset it later. Users other than the author can change flags only with the Manage Messages permission.

Why is my Discord embed not showing?

SymptomLikely cause in Discord's docsFix
No preview at allTags added by JavaScript, a non 2xx response, or a fetch over 10 secondsPrint tags server side; speed up the page and image
No preview at allog:site_name over 256 characters, or a URL over 2,048 charactersShorten the value
Small thumbnail instead of a large imageNo twitter:card summary_large_imageAdd the twitter:card line
Old title or image after an editThe 30 minute cacheTest with ?v=2, or wait
Gallery of images you did not expectTwo or more og:image tagsKeep one og:image
Accent color ignoredtheme-color not in 6 or 8 digit hexUse #RRGGBB
Only some links in a message previewMore than 5 links per messageSplit the message
HTML tags shown in the descriptionDescriptions are plain text unless og:type is richStrip markup from og:description

What goes wrong

  • Duplicate tags from a theme and a plugin. Discord's first-wins and last-wins rules can give you one plugin's title and the other plugin's layout or color. Remove one source, as in the duplicate tag cleanup list.
  • Dimension tags on the wrong image tag. Width, height, type and alt attach to og:image and twitter:image only, not to og:image:secure_url. Use the plain tag names.
  • A slow image host. Without width and height tags Discord downloads the image to measure it, and that counts against the 10 second fetch.
  • A bot protection challenge. A rule that challenges unknown clients returns a non HTML or non 2xx response, and no preview appears.
  • Testing the same URL again and again. Inside the cache window every paste shows the old card. Use the query string trick, and read Slack's unfurling rules if the same link also misbehaves there.

Check it worked

  • View source shows one og:title, one og:image with width and height, one twitter:card set to summary_large_image, and one theme-color in hex.
  • curl shows a 2xx status and a text/html content type for the page.
  • The Embed Debugger lists your tags and reports the large image layout.
  • A test post with ?v=2 shows the large image, your title and the accent color.
  • After 30 minutes the plain URL shows the same card.

Sources

Questions

What meta tags does Discord use for embeds?

Discord reads og:title, og:description, og:site_name and og:image, with twitter equivalents as fallbacks. twitter:card sets the layout, theme-color sets the accent color, and a JSON oEmbed link can fill gaps and add an author line.

How do I make a Discord embed show a large image?

Add a meta tag with name twitter:card and content summary_large_image, alongside og:image. Without it, Discord's docs say a title, description and single image produce text with a small image.

How do I change the color of a Discord embed?

Add a theme-color meta tag with a 6 or 8 digit hex value, such as #1F6FEB. Discord's docs say other formats are not read, and the last theme-color tag in the document wins.

How long does Discord cache link previews?

About 30 minutes, according to Discord's Link Previews documentation. To see a change at once, share the URL with a new query string such as ?v=2, or check it in the Embed Debugger.

What user agent does Discord use to fetch link previews?

Discord's Link Previews documentation does not name one. It describes a single GET request that runs no scripts and must finish within 10 seconds. Check your server log when you paste a link to see the request.

Share this guide

Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.

  1. Slack link preview: how unfurling works and how to fix itHow Slack builds a link preview: the tags its robot reads, its user agent, the 30 minute cache, how to test, remove or block a preview, and why one fails.10 min read
  2. Twitter cards on X: tags and testingSet up Twitter card tags so links to your WordPress posts show a large image on X: the summary_large_image card, fallbacks to Open Graph, sizes and testing.6 min read
  3. Open Graph image size: 1200 by 630 and the safe zoneThe right Open Graph image size is 1200 by 630 pixels at a 1.91:1 ratio. Minimums, file limits, formats, and a centre safe zone for square crops.6 min read
  4. Link preview checker: test your Open Graph and card tagsPaste a page's HTML to check its Open Graph and X card tags, see mock previews, and find duplicate, missing or relative tags. Runs in your browser only.10 min read