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.

Get Blockenberg

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

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Link Preview”, insert it. Category: Content.
  3. Configure inspector controls that exist on this block. Open Link. Set “URL”, “Open in new tab”, “Content — Title”, “Description”.
  4. Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.

Inspector controls from this block’s code

ControlWhat the code does
URLText field in the inspector. Saved as `url`.
Open in new tabOn/off toggle in the inspector. On by default. Saved as `openNewTab`.
Content — TitleText field in the inspector. block.json default: An Interesting Article Title. Saved as `title`.
DescriptionMultiline 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 descriptionOn/off toggle in the inspector. On by default. Saved as `showDesc`.
Show imageOn/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 faviconOn/off toggle in the inspector. On by default. Saved as `showFavicon`.
Show domainOn/off toggle in the inspector. On by default. Saved as `showDomain`.
Card styleSelect 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 shadowOn/off toggle in the inspector. On by default. Saved as `shadow`.
Hover lift effectOn/off toggle in the inspector. On by default. Saved as `hoverLift`.
Colors — BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
Colors — BorderColor control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`.
Colors — TitleColor control in the inspector. block.json default: #111827. Saved as `titleColor`.
DescriptionColor control in the inspector. block.json default: #6b7280. Saved as `descColor`.
Domain / accentColor control in the inspector. block.json default: #6c3fb5. Saved as `domainColor`.

When this is the right block

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

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Link Preview from the Gutenberg inserter.

Get Blockenberg