How to embed video in WordPress (without YouTube killing your speed)
Direct answer
Q: What's the fastest way to embed a video in WordPress?
A: Skip YouTube's oEmbed block — it drops ~350 KB of scripts and tracker cookies onto every page load. The fastest approach is a lightweight iframe embed from a dedicated host, dropped into a Custom HTML block in Gutenberg (or the equivalent widget in Elementor/Divi/Bricks). HostMyVideo's lite embed is 2 KB and defers all player loading until the visitor clicks play, so LCP stays under 2.5s even with multiple videos per page.
WordPress powers roughly 43% of the web, which means someone building on WordPress is almost certainly the person Googling "how to embed video in WordPress" right now. This is a practical, ranked-by-page-weight guide to five ways of getting a video onto a WordPress page.
If you take one thing away: the default YouTube auto-embed is the slowest option and it's not close. Every other approach in this list beats it on both PageSpeed and viewer privacy.
The 5 options, ranked
Here's the ranking, worst to best, on the metric most WordPress site owners actually care about — how much weight the embed adds to the page.
1. YouTube auto-embed (block) — ~350 KB, drops 3rd-party cookies, ads possible. 2. Vimeo embed (block) — ~180 KB, no ads, still drops cookies. 3. WordPress-native uploaded MP4 — file size varies (usually 20-200 MB), no ads, no third-party cookies, but breaks your hosting bandwidth. 4. Wistia embed — ~230 KB base + ~150 KB player when triggered. 5. HostMyVideo lite embed — 2 KB base, player loads only on click.
The rest of this article walks through when each option makes sense and how to implement it.
Option 1: YouTube auto-embed (the default, and the worst)
WordPress's Gutenberg editor supports oEmbed for YouTube out of the box. Paste a YouTube URL into a paragraph and it becomes an embedded player. This is easy and it's also, page-speed-wise, catastrophic.
A stock YouTube embed pulls:
www.youtube.com/embed/*.js(~130 KB)www.google.com/js/*(~70 KB)www.gstatic.com/youtube/img/*(thumbnails, ~40 KB)- Multiple third-party cookies from doubleclick.net and youtube.com
- A hidden Google Analytics beacon
Total: ~350 KB on first page load. If you have five embedded videos on a page (a common pattern for a "resources" or "case studies" page), that's 1.75 MB of pre-download before the visitor has even clicked play.
Google's Core Web Vitals — LCP in particular — punish this severely. A page that would score green with plain text easily drops to yellow or red once you sprinkle YouTube on it.
When to use it anyway: you specifically want the video to be findable on YouTube's own platform and don't care about the SEO / speed cost on your site. That's a legitimate strategic choice, just an informed one.
Option 2: Vimeo embed
Same block-editor pattern (paste URL → embed). Vimeo's embed is meaningfully lighter than YouTube — no ads, cleaner player, roughly ~180 KB — but it still drops third-party cookies and still needs a full player render on initial page load.
When to use it: you're already on a Vimeo Pro/Business plan and don't want to migrate.
Option 3: WordPress's own upload
WordPress's Media Library accepts MP4 files up to whatever your hosting's upload_max_filesize allows (usually 64 MB by default, sometimes higher on managed WordPress hosts). You then use the Video block to embed the uploaded file.
This is technically the most privacy-friendly option because no external service is involved. But it has three practical problems:
1. Bandwidth. Every playback pulls the full file from your hosting. A single popular post can eat a shared-hosting bandwidth quota in an afternoon. 2. No transcoding. Your visitor's browser has to play whatever codec + bitrate you uploaded, which usually means the file plays fine on Chrome but stutters on Safari or fails on old Android. 3. No lite embed. The video block loads the WordPress player script and preloads a chunk of the file on page load, so a page with five uploaded videos is still heavy — just heavy with YOUR bytes instead of YouTube's.
When to use it: low-traffic personal blog, one video per page, hosting with plenty of bandwidth headroom.
Option 4: Wistia via plugin
Wistia has an official WordPress plugin that emits a slightly-optimized embed and gives you analytics inside the WP dashboard. The player itself is ~230 KB base + ~150 KB when the visitor clicks play — better than YouTube but not dramatically so.
When to use it: you're already paying for Wistia and want their analytics.
Option 5: A lite embed from a dedicated host
Modern video hosts have solved the "embed weight" problem by shipping a 1-3 KB "click to play" shell that only loads the actual player when the visitor clicks. HostMyVideo, for example, ships a 2 KB embed that:
- Renders the thumbnail immediately (no external requests beyond the image).
- Waits for the user to click play before loading any player JavaScript.
- Sets zero third-party cookies.
- Emits VideoObject schema on the watch page so Google can index the video.
In WordPress, drop it into a Custom HTML block:
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;">
<iframe
src="https://hostmyvideo.io/embed/YOUR_VIDEO_ID"
style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;"
loading="lazy"
allow="autoplay; fullscreen; picture-in-picture"
allowfullscreen
title="Your video title">
</iframe>
</div>That's it. No plugin needed. Works in Gutenberg (via the Custom HTML block), Classic Editor (paste directly), Elementor (HTML widget), Divi (Code module), and Bricks (Code element).
What about page builders?
Every major WP page builder supports raw HTML in some form. Here's the block/widget name for the ones people actually ask about:
- Elementor — HTML widget
- Divi — Code module
- Beaver Builder — HTML module
- Bricks — Code element
- Oxygen — Code Block element
The same iframe HTML above works in all of them.
What about a plugin?
You don't need one. WordPress doesn't require a plugin for a video embed — it just makes the block-editor UI a little friendlier. If you're publishing more than a couple of videos a week, we're building a first-party HostMyVideo plugin (in beta at time of writing) with a native Gutenberg block; ping support@querywing.com if you want early access.
The SEO angle
If your videos are commercially important to your site — product demos, course previews, tutorials — the SEO story matters as much as the speed story. Every HostMyVideo watch page (the /v/{id} URL) emits a VideoObject JSON-LD schema with:
- Video title, description, thumbnails
- Duration and upload date
- Full transcript as
transcriptproperty - AI-generated chapters as
hasPartClip elements (Google Key Moments target)
Your WordPress post that embeds the video doesn't need to do any of that heavy lifting — the schema lives on our page and Google indexes it there. If you want the schema on YOUR canonical URL, we ship a free VideoObject JSON-LD generator that outputs ready-to-paste markup.
The compliance angle
The GDPR / ePrivacy angle almost always tips the decision away from YouTube for European sites. YouTube's iframe drops cookies before the visitor has consented, which is a technical violation unless you gate the embed behind consent. Most cookie-consent plugins support that gating but it means the visitor has to click through TWO prompts (consent → play) before they see anything. Lite embeds sidestep the whole thing.
Recommended stack
For most WordPress sites, the stack we'd recommend as of 2026:
1. Video files hosted on a lite-embed platform (HostMyVideo, Cloudflare Stream, Bunny.net if you like DIY, Wistia if you already pay for it). 2. Embed via a Custom HTML block or the page builder's raw-HTML equivalent. 3. Video schema handled by the hosting platform. 4. Consent banner is fine to keep, but you don't need to gate the video behind it.
The result: a WP page with 5 embedded videos loads faster than most WP pages with zero embeds.
Host video that ranks.
Free 14-day trial. AI transcripts, chapters, summaries, and indexable schema on every upload.