How to embed videos without slowing down your website
Updated: November 8, 2026
A well-placed video improves a page; a badly placed one makes it slow, eats your visitors’ data and hurts your Google metrics (Core Web Vitals). The good news is that a few rules fix almost everything.
Why a video can slow your site
- If you serve the MP4 from your own hosting, the browser may start downloading megabytes nobody asked to watch.
- If the player has no reserved space, the page “jumps” when it loads (a poor visual-stability score).
- Loading several players at once, all at the top, delays what the visitor wants to see first.
The rules
- 1Host the video outside your hosting: with Dembed it’s served from its own storage, in several qualities, and only what’s played is downloaded.
- 2Reserve the space with aspect-ratio, so the page doesn’t move.
- 3Use loading="lazy" on iframes that aren’t on the first screen: they don’t load until the visitor gets close.
- 4Don’t autoplay every video: only the main one, if it really adds something.
- 5Put the video’s title in the iframe’s title attribute.
<iframe src="https://dembed.cc/embed/v_YOUR_ID" title="Product overview" style="width:100%;aspect-ratio:16/9;border:0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen loading="lazy"></iframe>Lots of videos on one page
- In a gallery, show thumbnails that link to the video and load the player only on click.
- Or embed them all with loading="lazy": only those the visitor scrolls to will load.
- Split very long lists across several pages.
How to check
Run your page through Google’s PageSpeed Insights before and after the changes. Look at the main content load time and visual stability: with these rules, videos stop being the problem.
Frequently asked questions
With loading="lazy" and reserved space, the impact is minimal: the video isn’t downloaded until someone presses play.