link-preview
Link Preview Plugin
Section titled “Link Preview Plugin”URL metadata extraction: Open Graph, Twitter Card, and oEmbed with caching. Free: MIT licensed.
Install
Section titled “Install”nself plugin install link-previewWhat It Does
Section titled “What It Does”Extracts rich metadata from URLs for link preview cards. Fetches Open Graph tags, Twitter Card metadata, and oEmbed data. Results are cached in Postgres to avoid repeated fetches. Use it to power link preview features in chat, CMS, or social feed applications.
Configuration
Section titled “Configuration”| Env Var | Default | Description |
|---|---|---|
LINK_PREVIEW_PORT | 3718 | Link preview service port |
LINK_PREVIEW_CACHE_TTL | 3600 | Cache TTL in seconds (1 hour) |
LINK_PREVIEW_TIMEOUT | 10s | HTTP fetch timeout |
LINK_PREVIEW_MAX_SIZE | 5MB | Max page size to fetch |
| Port | Purpose |
|---|---|
| 3718 | Link preview REST API |
Database Tables
Section titled “Database Tables”1 table added to your Postgres database:
np_link_preview_cache: cached URL metadata (title, description, image, favicon)
Nginx Routes
Section titled “Nginx Routes”| Route | Target |
|---|---|
/link-preview/ | Link preview API |
GET /health: Health checkGET /preview?url={url}: Fetch or return cached previewDELETE /preview?url={url}: Invalidate cache for URLGET /preview/batch: Batch preview multiple URLs