Blog Content Workflows 7 min read

Discord and Slack Link Preview Image Fallback Guide

Fix slack link preview image failures and Discord embed images with deterministic og:image fallback URLs that unfurl reliably in both platforms.

slack link preview imageDiscord embed imageog:image unfurlSlack unfurllink preview
Discord and Slack Link Preview Image Fallback Guide

When a URL is posted in Slack or Discord, the platform fetches the page's Open Graph meta tags and renders a link preview card. The slack link preview image comes from og:image. When that tag is missing or returns an error, the preview shows the page title and description with no image — a notably less engaging card.

Internal tools, documentation portals, and developer blogs are the most common sources of shared links in engineering Slack channels. These sites rarely have per-page OG images. A URL-based fallback strategy makes every shared link from these properties look intentional.

OG tags

Required og:image tags for reliable Slack and Discord unfurls

Provide og:image, og:image:width, og:image:height, og:title, and og:description at minimum. Slack shows the image at 400-500px wide in the unfurl card. Discord shows it at 400px wide. The aspect ratio is preserved. A 1200×630 image (1.91:1) is the standard that works across all platforms.

Slack does not require secure_url to be HTTPS in 2026, but HTTP og:image URLs may be blocked in enterprise workspaces with strict content policies. Always use HTTPS.

Implementation text
<!-- OG + Twitter Card meta tags for maximum unfurl compatibility -->
<meta property="og:title" content="Database Schema Migration Guide v2.0" />
<meta property="og:description" content="Step-by-step migration from v1 to v2 schema..." />
<meta property="og:image"
  content="https://fallback.pics/api/v1/thumbnail/1200x630.png
    ?text=Database+Schema+Migration+Guide+v2.0
    &label=Docs&theme=purple&style=soft" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

<!-- Twitter Card fallback (Discord also reads these) -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image"
  content="https://fallback.pics/api/v1/thumbnail/1200x630.png
    ?text=Database+Schema+Migration+Guide+v2.0
    &label=Docs&theme=purple&style=soft" />

Internal tools

Generating og:image for internal documentation and runbooks

Internal documentation portals (Notion-exported pages, Confluence, custom wikis) are shared constantly in Slack. They almost never have per-page OG images. A site-wide layout that generates a fallback.pics thumbnail from the page title and section name covers every page without per-page work.

For Notion, you cannot inject custom OG tags into exported pages. The workaround is to publish Notion content through a proxy (Feather, super.so, Potion) that adds a custom head and lets you configure OG image generation per page or based on the page title.

Implementation text
// Express middleware — inject og:image for every page
app.use((req, res, next) => {
  res.locals.generateOgImage = (title, section = 'Docs') =>
    `https://fallback.pics/api/v1/thumbnail/1200x630.png` +
    `?text=${encodeURIComponent(title)}` +
    `&label=${encodeURIComponent(section)}` +
    `&theme=purple&style=soft`;
  next();
});

// In your EJS/Handlebars template
// <meta property="og:image" content="<%= generateOgImage(pageTitle, section) %>" />

Testing

Debugging unfurl previews without spamming your Slack channel

Slack provides an API endpoint for testing unfurls: chat.unfurl in the Slack API. You can call it with a URL to see the resolved unfurl data without posting to a channel. The simpler approach is to create a private Slack channel used exclusively for testing link previews and post URLs there.

Discord's embed tester is available at discohook.org — a community tool that lets you construct and preview Discord embeds including link unfurls. For your own URL, the easiest test is to create a server and post the URL in a private channel.

Key takeaways

What to standardize before shipping

  • Slack and Discord fetch og:image from their own servers without user credentials — authenticated pages cannot provide previews.
  • Include og:image:width and og:image:height in your meta tags so Slack and Discord display the card immediately.
  • Discord also reads Twitter Card tags; providing both sets maximizes compatibility.
  • For internal tools behind authentication, serve OG tags in a public metadata layer or use the platform's rich message API.
  • Test with a private Slack channel or discohook.org without polluting shared channels.

Production fallback layer

Use fallback.pics anywhere an image URL is accepted.

Start with one deterministic URL and standardize fallback behavior across your design system.

Read the docs