Back to Blog
SlackOpen GraphSocial PreviewsDeveloper Guide

Open Graph Tags for Slack: How to Optimize Link Previews

Master Slack link previews with optimized Open Graph and Twitter Card meta tags. Learn Slackbot crawler caching, unfurling rules, and debugging techniques.

SS
Sanjay Samanta
March 24, 2026
11 min read

When teammates, clients, or community members share your links inside Slack, the resulting rich preview (known in Slack’s ecosystem as an “unfurl”) determines whether users click through or ignore the message. A broken image thumbnail, truncated title, or missing description creates an amateur impression, while an optimized preview delivers instant value and drives engagement across team channels.

In this developer guide, you will learn how Slack’s unfurling engine parses Open Graph and Twitter Card tags, how Slackbot crawls and caches your assets, how to resolve caching lag, and how to test your URLs before sharing using our free Open Graph Inspector.


Slack does not render full HTML pages in a headless browser when previewing URLs. Instead, Slack’s backend scraper (Slackbot-LinkExpanding) fetches your raw HTML head, parses standard Open Graph meta properties, and falls back to Twitter Card tags if Open Graph tags are missing.

<!-- Core Open Graph Configuration for Slack -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Open Graph Tags for Slack: Developer Implementation" />
<meta property="og:description" content="Configure pixel-perfect Slack link unfurls with custom meta tags and cache-busting strategies." />
<meta property="og:url" content="https://opengraphgenerator.com/blog/og-for-slack/" />
<meta property="og:image" content="https://opengraphgenerator.com/images/slack-og-banner.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:site_name" content="Open Graph Generator" />

The Unfurl Anatomy: How Slack Renders Each Tag

  1. og:site_name / twitter:site: Appears as the muted domain or organization label directly above the card title.
  2. og:title: Rendered as bold, clickable blue hyperlink text. Slack truncates titles after approximately 70–80 characters.
  3. og:description: Displays beneath the title in regular body font. Slack limits descriptions to around 2–3 lines (approximately 150–200 characters) before truncating with an ellipsis.
  4. og:image: Rendered as either a compact square thumbnail (for images under 500px wide or non-1.91:1 aspect ratios) or an expansive full-width banner card (for 1200×630px images).
  5. Favicon: Fetched from your root <link rel="icon"> and displayed next to the site name. Audit your icon assets using our Favicon Generator & Validator.

Slack Image Sizing: Full-Width vs. Thumbnail

Slack uses strict image dimension thresholds to decide whether to render your preview image as a large horizontal banner or a small right-aligned square:

Preview Format Minimum Dimensions Recommended Aspect Ratio Best Use Case
Large Full-Width Banner 500 × 261 px (Up to 1200 × 630 px) 1.91:1 Blog posts, marketing landers, product announcements
Small Square Thumbnail 200 × 200 px (Under 500 px wide) 1:1 (Square) User profiles, documentation articles, code repos

[!TIP] Always supply both og:image:width and og:image:height tags alongside og:image. This enables Slack to allocate the correct container dimensions immediately without waiting for the full image download to calculate layout aspect ratios.

<meta property="og:image" content="https://example.com/images/hero-1200x630.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Slack link preview illustration demonstrating unfurl tags" />

Slackbot Crawler Behavior & Technical Constraints

Understanding how Slackbot interacts with your web server prevents unexpected unfurl failures:

  • User-Agent String: Slackbot-LinkExpanding 1.0 (+https://api.slack.com/robots)
  • IP Range: Slack crawls from AWS IP ranges. If your staging environment is behind IP whitelisting or Basic Authentication, Slackbot will receive a 401 Unauthorized or 403 Forbidden and fail to unfurl.
  • HTTPS & SSL Requirements: Slack requires valid SSL certificates with full certificate trust chains. Self-signed or expired certificates immediately abort unfurling. Verify your server configuration with our Security Headers & SSL Auditor.
  • File Size Limits: Preview images must be under 5 MB (preferably under 1 MB). WebP, PNG, and JPEG formats are fully supported.
  • Response Timeout: Your server must return the HTML <head> within 3.0 seconds. Slow SSR backends or cold-start serverless functions risk timing out.

Multi-Framework Integration Examples

Implementing consistent Slack-ready Open Graph tags across modern frameworks requires leveraging native metadata APIs:

1. Next.js App Router (layout.tsx / page.tsx)

import type { Metadata } from 'next';

export const metadata: Metadata = {
  title: 'Real-Time Analytics Dashboard | SaaS Platform',
  description: 'Monitor latency, active sessions, and revenue streams in real time.',
  openGraph: {
    title: 'Real-Time Analytics Dashboard | SaaS Platform',
    description: 'Monitor latency, active sessions, and revenue streams in real time.',
    url: 'https://example.com/analytics/',
    siteName: 'SaaS Platform',
    images: [
      {
        url: 'https://example.com/og/analytics-1200x630.png',
        width: 1200,
        height: 630,
        alt: 'Analytics Dashboard Overview',
      },
    ],
    type: 'website',
  },
  twitter: {
    card: 'summary_large_image',
    title: 'Real-Time Analytics Dashboard',
    description: 'Monitor latency, active sessions, and revenue streams in real time.',
    images: ['https://example.com/og/analytics-1200x630.png'],
  },
};

For a comprehensive guide on Next.js metadata generation, read our Next.js Open Graph Guide.

2. Astro Component Head

---
interface Props {
  title: string;
  description: string;
  image: string;
  canonicalUrl: string;
}

const { title, description, image, canonicalUrl } = Astro.props;
---
<head>
  <title>{title}</title>
  <meta name="description" content={description} />
  <link rel="canonical" href={canonicalUrl} />

  <!-- Open Graph -->
  <meta property="og:type" content="article" />
  <meta property="og:title" content={title} />
  <meta property="og:description" content={description} />
  <meta property="og:url" content={canonicalUrl} />
  <meta property="og:image" content={image} />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />

  <!-- Twitter Card -->
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:title" content={title} />
  <meta name="twitter:description" content={description} />
  <meta name="twitter:image" content={image} />
</head>

Troubleshooting Common Slack Preview Issues

1. Slack Displays Cached / Outdated Metadata

Slack aggressively caches unfurl metadata for up to 30 minutes to 2 hours per URL across a workspace.

The Fix:

  • Append a cache-busting query parameter when testing in Slack (e.g. https://example.com/pricing/?v=2 or https://example.com/pricing/?slack_test=1).
  • Test and preview your tags in our Open Graph Inspector or Twitter Card Generator before posting to public Slack channels.

2. The Preview Does Not Unfurl at All

  • Cause A (Workspace Settings): Slack allows workspace administrators to disable automatic link unfurling under Settings & Permissions > Permissions > Link Previews.
  • Cause B (Domain Blacklist): If a domain was previously flagged for spam, Slackbot will silently skip unfurls.
  • Cause C (Robots.txt Blocking): If your robots.txt disallows all crawlers (User-agent: * Disallow: /), Slackbot may honor the restriction. Verify your crawl rules with our Robots.txt Simulator & Validator.

3. Missing Fallbacks

If Open Graph tags are absent, Slack inspects Twitter Card meta tags:

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Open Graph Tags for Slack" />
<meta name="twitter:description" content="Optimize Slack link previews for higher team engagement." />
<meta name="twitter:image" content="https://example.com/image.png" />

For a deep dive into Twitter Card fallbacks, read our guide on Twitter Card vs Open Graph Meta Tags.


Multi-Platform Compatibility Matrix

When configuring metadata, ensure your markup serves Discord, LinkedIn, Facebook, and WhatsApp simultaneously:

Platform Title Character Limit Description Limit Ideal Image Size Supported Card Formats
Slack ~75 chars ~180 chars 1200 × 630 px Full banner & thumbnail
Discord ~70 chars ~250 chars 1200 × 630 px Rich embed + theme-color
LinkedIn ~60 chars ~160 chars 1200 × 627 px Landscape feed post
WhatsApp ~65 chars ~150 chars 800 × 800 px or 1200 × 630 px Compact chat preview
Twitter / X ~70 chars ~200 chars 1200 × 628 px Summary & Large image

Explore platform-specific optimizations in our dedicated companion guides:


  1. Include complete Open Graph tags (og:title, og:description, og:image, og:url, og:site_name).
  2. Explicitly define image dimensions via og:image:width="1200" and og:image:height="630".
  3. Keep images under 1 MB in WebP or optimized PNG format.
  4. Audit canonical URLs to prevent duplicate redirect hops that delay Slackbot. Use our Meta Tag Auditor to check your headers.
  5. Pair with structured data: Add Schema.org JSON-LD for search engine rich snippets using our JSON-LD Schema Generator. For AI coding agent context, explore the Open Knowledge Format (OKF).

Test your webpage tags now with our free Open Graph Generator and ensure flawless previews across every team channel!