Skip to content

Conversation

@fmartingr
Copy link

Overview

This PR adds OpenGraph link preview functionality to Memos. When enabled, external HTTP/HTTPS links in memos will display rich preview cards showing the page title, description, and preview image - similar to what you see on Twitter, LinkedIn, and other modern platforms.

Features

  • Card-style link previews with image, title, description, and domain name
  • Server-side caching (7-day TTL) to minimize external API requests
  • Client-side caching via React Query for optimal performance
  • Instance-level setting to enable/disable the feature
  • URL normalization for consistent caching across different URL formats
CleanShot 2026-01-12 at 17 12 25@2x

How It Works

  1. When viewing a memo, the frontend extracts all HTTP/HTTPS URLs from the markdown content
  2. If link previews are enabled, it fetches OpenGraph metadata for each URL via the new API endpoint
  3. Preview cards are displayed below the memo content with the fetched metadata
  4. Responses are cached on both server and client to avoid redundant requests

Configuration

Enable the feature in Settings → Memo Related Settings → "Enable OpenGraph link previews".

@fmartingr fmartingr changed the title feat; add OpenGraph Link Preview Support feat: add OpenGraph Link Preview Support Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant