Directory / plugin

Iframe Block – Easy Embed Block for YouTube, Vimeo & More

v1.1.0 · by WPXERO

Embed responsive YouTube, Vimeo, Google Maps and other iframes from the block editor, with captions, aspect ratios, privacy mode and lazy-loading.

About this plugin

Iframe Block adds one dedicated block for every external embed that has no first-party core block: videos, maps, audio players, dashboards, booking tools, donation widgets, LMS players, calendars and forms.

Paste a link, pick a ratio, publish. The block converts YouTube and Vimeo links to their proper player URLs automatically, so a plain youtu.be/… share link or a Vimeo unlisted link just works.

What you get

  • Responsive aspect ratios — 16:9, 4:3, 1:1, 21:9 and 9:16 reserve the space before the embed loads, so nothing jumps around while the page renders. Fixed pixel heights are still available for maps, forms and dashboards.
  • Smart URL handling — YouTube watch, share, Shorts, live and embed links, playlists and start times (?t=1m30s) are normalised. Vimeo watch, channel, group and unlisted (hash) links become proper player URLs.
  • Privacy mode — one toggle switches YouTube to youtube-nocookie.com, so no viewing cookies are set until playback starts.
  • Lazy-loading that behaves — each block gets its own load margin, embeds load once and never reload on scroll, and the small helper script is only enqueued on pages that actually contain a lazy embed. Optional “watch for dynamic content” also covers embeds inserted later by sliders, tabs or infinite scroll.
  • SEO and accessibility markup — semantic figure / figcaption, a required accessible title on every iframe, and a noscript fallback link to the embed for crawlers and script-less visitors.
  • Safe by default — only http(s) URLs are accepted, inline styles are filtered for known XSS vectors, sandbox tokens are validated, and referrerpolicy="strict-origin-when-cross-origin" is always set.

Pair it with your SEO plugin (Yoast, Rank Math, SEOPress, AIOSEO, The SEO Framework) for meta tags, schema and sitemaps.

Plugin tags