Media · Gutenberg

Embed Preview block for WordPress

Privacy-friendly click-to-load embed with a custom thumbnail, CTA overlay, and optional privacy notice.

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

Privacy-friendly click-to-load embed with a custom thumbnail, CTA overlay, and optional privacy notice.

Inspector panels on this block: Embed Content, Thumbnail, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Provider” options: Custom / Other, Figma, Loom, YouTube, Typeform; “CTA Style” options: Filled, Outline, Ghost; “Aspect ratio” options: 16:9 (widescreen), 4:3 (classic), 1:1 (square), 3:2, 21:9 (ultra-wide).

Where to find it

Gutenberg inserter → Media → search “Embed Preview” (block name `blockenberg/embed-preview` in block.json). Style it in the sidebar after insert.

How to use Embed 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 “Embed Preview”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Embed Content. Set “Provider”, “Embed URL”, “Show title”, “Embed Content — Title”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
ProviderSelect control; the chosen value is saved on the block. Options: Custom / Other; Figma; Loom; YouTube; Typeform; Calendly; Miro; Notion; Airtable. block.json default: custom. Saved as `embedProvider`.
Embed URLText field in the inspector. Saved as `embedUrl`.
Show titleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Embed Content — TitleText field in the inspector. block.json default: Open in Figma. Saved as `embedTitle`.
Show descriptionOn/off toggle in the inspector. Off by default. Saved as `showDescription`.
DescriptionText field in the inspector. Saved as `description`.
CTA Button LabelText field in the inspector. block.json default: Click to open. Saved as `ctaLabel`.
CTA StyleSelect control; the chosen value is saved on the block. Options: Filled; Outline; Ghost. block.json default: filled. Saved as `ctaStyle`.
Show provider badgeOn/off toggle in the inspector. On by default. Saved as `showBrand`.
Show loading barOn/off toggle in the inspector. On by default. Saved as `showLoadingBar`.
Show privacy noteOn/off toggle in the inspector. On by default. Saved as `showPrivacyNote`.
Privacy note textText field in the inspector. block.json default: No data is loaded until you click.. Saved as `privacyNote`.
Aspect ratioSelect control; the chosen value is saved on the block. Options: 16:9 (widescreen); 4:3 (classic); 1:1 (square); 3:2; 21:9 (ultra-wide); Custom height. block.json default: 16-9. Saved as `aspectRatio`.
Custom height (px)Numeric range control in the inspector. Range 200–1200. block.json default: 480. Saved as `customHeight`.
Max width (px)Numeric range control in the inspector. Range 400–1400. block.json default: 900. Saved as `maxWidth`.
Border radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `borderRadius`.
Overlay opacity (%)Numeric range control in the inspector. Range 0–95. block.json default: 55. Saved as `overlayOpacity`.
iframe sandbox (advanced)Text field in the inspector. block.json default: allow-scripts allow-same-origin allow-forms allow-popups allow-presentation. Saved as `iframeSandbox`.
Typography — TitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`.
Description (Typo Desc)Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoDesc`.
CTA ButtonShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoCta`.
Overlay ColorColor control in the inspector. block.json default: #0f172a. Saved as `overlayBg`.
CTA BackgroundColor control in the inspector. block.json default: #6366f1. Saved as `ctaBg`.
CTA TextColor control in the inspector. block.json default: #ffffff. Saved as `ctaColor`.
Title ColorColor control in the inspector. block.json default: #f8fafc. Saved as `titleColor`.
Description ColorColor control in the inspector. block.json default: #cbd5e1. Saved as `descColor`.
Privacy Note ColorColor control in the inspector. block.json default: #94a3b8. Saved as `privacyColor`.
Border ColorColor control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`.

What the front-end script actually does

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 Embed Preview block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Embed Preview”. It sits under Media. After insert, open Embed Content and set “Provider”, “Embed URL”, “Show title”, “Embed Content — Title”.

What makes Embed Preview different from other Blockenberg blocks?

Privacy-friendly click-to-load embed with a custom thumbnail, CTA overlay, and optional privacy notice. Inspector labels on this block include “Provider”, “Embed URL”, “Show title”, “Embed Content — Title”.

Is the Embed Preview Gutenberg block free?

Yes. Embed Preview ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Embed 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: Embed Content, Thumbnail, Layout).

Related media blocks

Get Blockenberg

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

Get Blockenberg