A short video can show a product working, introduce the people behind a business or explain a process far faster than text. It is also one of the easiest ways to make a page slow. A single embedded player can add several hundred kilobytes of scripts before anyone presses play, and an autoplaying background video can outweigh the rest of the page many times over.
The good news is that most of that cost is avoidable. This guide explains how video affects loading, how to choose between embedding and self-hosting, and the techniques that keep pages fast while still using video well.
The short answer
To use video without slowing your site:
- Don’t load a player until it is needed. Show a lightweight preview image and load the player when someone clicks.
- Embed long videos from a video platform; self-host only short, small clips.
- Avoid autoplaying background video on mobile, or keep it very short, small and silent.
- Compress and size video for the web, with a poster image.
- Add captions so the content works without sound.
- Measure before and after with PageSpeed Insights.
How video slows pages down
Video affects performance in two different ways:
| Cause | What happens | Effect on visitors |
|---|---|---|
| Embedded player scripts | The page loads the platform’s player code, styles and tracking before anyone clicks | Slower loading and slower response to taps |
| Large video files | The browser downloads video data, sometimes the whole file | Heavy data use, slow loading on mobile connections |
| Video as the main element | A video or its poster becomes the largest thing on screen | A slow Largest Contentful Paint score |
Embedded players are the most common problem on business sites. A standard embed loads far more than the video itself, on every page view, even for visitors who never press play. Our guide to third-party scripts and website speed explains why outside code is so costly.
Embed or self-host?
| Option | Best for | Trade-offs |
|---|---|---|
| Video platform embed (YouTube, Vimeo and similar) | Longer videos, tutorials, anything you also want found on the platform | Heavy player scripts; platform branding; possible tracking and cookies |
| Self-hosted video file | Short clips, product loops, silent demonstrations | You handle compression, formats and bandwidth; no adaptive streaming by default |
| Specialised video hosting | Businesses with many videos who need control and privacy | Usually a paid service |
For most service businesses, a sensible mix is to embed longer videos with a lightweight loading pattern and self-host only very short, silent clips.
Also ask whether the page needs a video at all. A clear photo with a two-line caption often explains a product faster than a minute of footage, and costs a fraction of the data. Video earns its place when movement or a person’s voice adds something a still image can’t, such as showing how a product works, walking through a space, or letting a client hear from the people they will work with.
Load the player only when it is needed
The most effective technique is called a facade. Instead of loading the full player, the page shows a static thumbnail with a play button. When the visitor clicks, the real player loads and starts.
The visitor sees the same thing, but the page doesn’t pay the cost of the player until it is used. Google’s Lighthouse documentation on lazy loading third-party resources with facades explains the approach, and lightweight open-source embed components for common platforms already exist.
If you embed YouTube, consider its privacy-enhanced mode (the youtube-nocookie.com domain), which limits cookies until the visitor plays the video. Check your privacy policy reflects how embeds behave.
For players further down the page, native lazy loading delays the iframe until the visitor scrolls near it:
<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" loading="lazy" title="Product demonstration" allowfullscreen></iframe>
Background and hero videos
Autoplaying background videos look impressive in a design presentation, but they are expensive on phones and rarely add information. If you use one:
- keep it short, around ten seconds or less, looping;
- make it silent and use the
mutedandplaysinlineattributes, which browsers require for autoplay; - set a poster image so something appears immediately;
- compress heavily, because detail matters less behind text;
- consider showing only the poster image on mobile or to visitors who prefer reduced data or motion;
- never put essential information only in the video.
A typical self-hosted background clip looks like this:
<video autoplay muted loop playsinline poster="/media/hero-poster.jpg" preload="none">
<source src="/media/hero.webm" type="video/webm">
<source src="/media/hero.mp4" type="video/mp4">
</video>
Remember that a pause control helps visitors who find moving backgrounds distracting. WCAG requires a way to pause content that moves automatically for more than five seconds.
Compress and prepare video for the web
Camera files are far larger than a website needs. Before uploading a self-hosted clip:
- Resize it to the largest size it will appear on screen.
- Lower the frame rate for simple loops, if motion still looks smooth.
- Remove the audio track from silent clips.
- Export to modern formats, such as WebM alongside MP4 for compatibility.
- Create a poster image in a modern format such as WebP or AVIF. Our guide to image optimisation covers that step.
Make video accessible
Video should work for people who can’t hear it, can’t see it, or are browsing with the sound off on a train:
- Captions for anything with speech. Auto-generated captions are a start but need checking.
- A transcript or summary in the page text, which also helps search engines understand the content.
- Descriptive titles on iframes, so screen reader users know what the player contains.
- Keyboard-accessible controls that don’t trap focus.
Check the impact
Before and after adding video, run the page through PageSpeed Insights on mobile. Look at Largest Contentful Paint, Total Blocking Time and the list of third-party code. If scores drop sharply, the player or file is loading too early. Our guide to reading PageSpeed Insights explains each part of the report.
Frequently asked questions
Does embedding YouTube videos help SEO?
A video can help a page if it genuinely adds value, and hosting it on YouTube can bring visibility there too. The video doesn’t need to load immediately to count: a facade still lets search engines see the page and the embed.
Is it better to host videos on my own server?
For short, silent clips, often yes. For longer videos with sound, video platforms handle streaming, multiple qualities and bandwidth far better than a typical web host.
Should videos autoplay?
Videos with sound should not autoplay. Silent background clips can, but keep them short, provide a way to pause them, and consider not loading them on mobile at all.
What to do next
Open your heaviest page with video on a phone and check how long it takes before the page responds to a tap. If it feels sluggish, replace the standard embed with a facade first. That single change usually makes the biggest difference.
Our website design and development service plans video into the design so it loads only when needed, and the Growth care plan in our website maintenance service includes regular speed work on existing pages.