Content · Gutenberg
Link Preview block for WordPress
Manually-configured link preview card (OpenGraph style) with image, favicon, title, description, and domain.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Manually-configured link preview card (OpenGraph style) with image, favicon, title, description, and domain.
Inspector panels on this block: Link, Content, Image, Favicon, Style & Layout. Those titles come from index.js, not from a shared template.
Behavior controls: “Card style” options: Horizontal (image left), Vertical (image top), Minimal (no image), Large banner (top image).
Link Preview has no render.php and no frontend.js. The saved Gutenberg HTML is what visitors see, plus Blockenberg layout/typography CSS.
Where to find it
Gutenberg inserter → Content → search “Link Preview” (block name `blockenberg/link-preview` in block.json). Style it in the sidebar after insert.
How to use Link Preview block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Link Preview”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Link. Set “URL”, “Open in new tab”, “Content — Title”, “Description”.
- Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| URL | Text field in the inspector. Saved as `url`. |
| Open in new tab | On/off toggle in the inspector. On by default. Saved as `openNewTab`. |
| Content — Title | Text field in the inspector. block.json default: An Interesting Article Title. Saved as `title`. |
| Description | Multiline text field in the inspector. block.json default: A short excerpt or description of the linked page that gives visitors context about what they'll find there.. Saved as `description`. |
| Domain (e.g. github.com) | Text field in the inspector. Saved as `domain`. |
| Site name (e.g. GitHub) | Text field in the inspector. Saved as `siteName`. |
| Show description | On/off toggle in the inspector. On by default. Saved as `showDesc`. |
| Show image | On/off toggle in the inspector. On by default. Saved as `showImage`. |
| Image height (px) | Numeric range control in the inspector. Range 80–480. block.json default: 160. Saved as `imageHeight`. |
| Image width — horizontal (px) | Numeric range control in the inspector. Range 100–400. block.json default: 220. Saved as `imageWidth`. |
| Show favicon | On/off toggle in the inspector. On by default. Saved as `showFavicon`. |
| Show domain | On/off toggle in the inspector. On by default. Saved as `showDomain`. |
| Card style | Select control; the chosen value is saved on the block. Options: Horizontal (image left); Vertical (image top); Minimal (no image); Large banner (top image). block.json default: horizontal. Saved as `cardStyle`. |
| Max width (px) | Numeric range control in the inspector. Range 240–1000. block.json default: 600. Saved as `maxWidth`. |
| Border radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 14. Saved as `borderRadius`. |
| Border width (px) | Numeric range control in the inspector. Range 0–4. block.json default: 1. Saved as `borderWidth`. |
| Drop shadow | On/off toggle in the inspector. On by default. Saved as `shadow`. |
| Hover lift effect | On/off toggle in the inspector. On by default. Saved as `hoverLift`. |
| Colors — Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Colors — Border | Color control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`. |
| Colors — Title | Color control in the inspector. block.json default: #111827. Saved as `titleColor`. |
| Description | Color control in the inspector. block.json default: #6b7280. Saved as `descColor`. |
| Domain / accent | Color control in the inspector. block.json default: #6c3fb5. Saved as `domainColor`. |
When this is the right block
- Manually-configured link preview card (OpenGraph style) with image, favicon, title, description, and domain — that is the job of Link Preview, not a generic content block.
- Use it when you need the editor control labeled “URL”, which exists on this block’s inspector.
- It matches pages about link, preview, card.
- Inserter grouping: articles, cards, lists, and long-form layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Link Preview block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Link Preview”. It sits under Content. After insert, open Link and set “URL”, “Open in new tab”, “Content — Title”, “Description”.
What makes Link Preview different from other Blockenberg blocks?
Manually-configured link preview card (OpenGraph style) with image, favicon, title, description, and domain. Inspector labels on this block include “URL”, “Open in new tab”, “Content — Title”, “Description”.
Is the Link Preview Gutenberg block free?
Yes. Link Preview ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Link Preview to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Link, Content, Image, Favicon).
Related content blocks
Link Card Grid
Visual navigation card grid for resource hubs and docs pages. Each card has icon, title, description, and URL.
Icon Box
Single card with icon, title, text, and optional link button. Perfect for feature lists inside Row/Column.
Accordion
Collapsible accordion panels for FAQ, features, and more.
Accordion Table
A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices.
Alert / Notice
Info, success, warning or error notice block with icon, title and body text. Pure CSS — zero JS.
Big Stat
Display a single large impactful statistic with prefix, suffix, label, and multiple visual styles.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Link Preview from the Gutenberg inserter.