Guide

How to Use Video on Your Website Without Slowing It Down

Video is one of the most engaging forms of content on the web. A well-produced explainer video can communicate in 60 seconds what would take a visitor five minutes to read, and research consistently shows that pages with video achieve higher dwell times and lower bounce rates. But video is also one of the largest and most performance-threatening assets a webpage can contain.

The challenge is that loading a video file — or even just the player to play one — adds significant weight to a page. An autoplay background video in the hero section, a third-party video player with its own JavaScript bundle, or an unoptimised video file can each add several seconds to your page load time and significantly worsen your Core Web Vitals scores. Understanding how to use video well means understanding how to mitigate these risks.

Hosting Video: YouTube, Vimeo, or Self-Hosted?

Third-party hosting platforms such as YouTube and Vimeo are the most common choice for websites, and for good reason. They handle video compression, adaptive streaming, and delivery — and their players work across all devices without you needing to write any code. The trade-off is that embedding a YouTube player loads a significant amount of third-party JavaScript from Google's servers, which adds to your page's total blocking time and can harm performance scores.

A widely used optimisation technique is the "lazy load YouTube facade" approach: instead of embedding the full YouTube player, display only a thumbnail image on page load. When the visitor clicks the thumbnail, the actual YouTube player loads at that point. Since most visitors do not play every video on a page they visit, this approach means only visitors who actively choose to watch the video trigger the player load. Libraries such as lite-youtube-embed implement this pattern with minimal code.

Self-Hosted Video and Performance Considerations

Self-hosting video — serving the file directly from your own server or CDN — gives you the most control over performance but requires careful handling. Raw video files from a camera or editing software are far too large for web delivery. A 1-minute video exported from a professional camera might be 1GB or more. For web delivery, that same video should typically be under 20MB, achieved through codec selection (H.264 or H.265), resolution matching (serving 720p for most contexts rather than 4K), and compression settings in tools like Handbrake or FFmpeg.

Always include a poster attribute on the HTML video element — a static thumbnail image displayed before the video loads or plays. Without a poster, the video element displays as a blank rectangle while the file loads, which both looks poor and affects your Cumulative Layout Shift score if the video element is above the fold. Serve video over a CDN rather than your origin server to ensure fast delivery for visitors in all locations.

Autoplay, Background Video, and Accessibility

Autoplay video should be used sparingly and only with the audio muted. Unexpected audio from an autoplaying video is one of the fastest ways to cause visitors to leave a page. Most browsers block autoplay with sound by default, but even silent autoplay adds to load time and data consumption — particularly on mobile connections where users may be on a limited data plan.

Always include captions or subtitles for any video with speech or narration. This is both an accessibility requirement and a usability improvement — many people watch video in public without audio, on muted devices, or with hearing impairments. A caption file can also be indexed by search engines, giving your video content additional SEO value beyond what can be inferred from the page title and description alone.

FAQs

Common questions.

Does embedding a YouTube video hurt my website's SEO?
Embedding YouTube videos does not directly hurt SEO, but it can indirectly harm rankings if it slows your page significantly and worsens Core Web Vitals scores. Using a lazy-load facade pattern mitigates this risk. Note that video embedded from YouTube helps YouTube's SEO more than yours — the video is indexed under your channel, not your page. For video content you want to rank on your own domain, self-hosting is preferable.
What video format should I use for my website?
MP4 with H.264 codec is the most universally supported format and the safest choice for broad compatibility. WebM with VP9 or AV1 offers better compression at equivalent quality and is supported by modern browsers, but requires a fallback for older browsers. Serving both formats using the HTML video element's source children lets browsers choose the best option they support.
How do I know if video is helping or hurting my website?
Check your Core Web Vitals in Google Search Console before and after adding video. Run PageSpeed Insights on pages with video to see whether they flag video-related issues. Check dwell time and bounce rate in your analytics to see whether pages with video perform better for engagement than equivalent pages without. Video that loads slowly and causes poor performance scores may be hurting more than helping, even if engagement on the video itself is positive.
Related guides

More on web design & ux.

Want a hand putting this into practice?

Book a free, no-obligation consultation with a Norwich-based specialist.

Book a free consultation
Get started

Let's put your business in a better light.

Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.

  1. 01
    Tell us a bitFill in the form — two minutes, tops.
  2. 02
    We'll call you backWithin one working day, no pressure.
  3. 03
    Get a clear planHonest advice and a fixed quote.

Free · No obligation · We reply within one working day

Book a free consultation