You finally have an explainer video for your AI product. You add it to your WordPress homepage, run a speed test, and the score drops.
The page feels heavier on mobile, and the hero section jumps around while it loads. Now you are stuck choosing between a faster homepage and a homepage that explains your product.
You don’t have to choose. The slowdown rarely comes from the video itself. It comes from how the video is embedded:
- a player that loads everything up front,
- a file that is far bigger than it needs to be,
- or a container with no fixed size.
This guide shows you how to add a 60–90 second explainer video to a WordPress homepage so visitors can watch it, while the page still loads as fast as it did before.
What you need before you start
- The final video file (ideally an MP4 exported at 1080p) or the link to the video on YouTube or Vimeo.
- A poster image: a 1280×720 JPG or WebP still that shows what the video is about. A frame from the video with a short caption works well.
- A captions file (.vtt or .srt) if you self-host. YouTube and Vimeo can host captions for you.
- Admin access to WordPress, so you can add a Custom HTML block or edit the homepage template.
- A baseline speed measurement of your homepage. Run it through Google PageSpeed Insights before you change anything and note the mobile score, Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS).
Plan about 45 minutes for the whole process, including testing.
Step-by-step: add the video without slowing the page
-
Measure first. Save the PageSpeed Insights report for your current homepage (mobile and desktop).
Without a baseline you cannot tell whether the video caused a problem or whether the page was already slow.
-
Choose where the video is hosted. You have two realistic options:
- Self-hosted (the MP4 lives in your media library). No third-party scripts, no ads, no “related videos” at the end. Best for a short homepage video when your host or CDN can serve files quickly.
- YouTube or Vimeo. Free bandwidth and adaptive streaming, plus the video can be found on those platforms. The downside: the standard embed loads the platform’s player scripts as soon as the page loads, whether or not anyone presses play.
For a 60–90 second homepage video, both work. The rest of this guide covers each case.
-
If you self-host, compress the file. A 90-second video does not need to be hundreds of megabytes.
Export an H.264 MP4 at 1080p (720p is often enough for a homepage player), with a moderate bitrate. Free tools such as HandBrake have web-optimised presets.
Play the result full screen and check that the interface text in your screen recordings is still sharp. If it isn’t, raise the quality slightly rather than switching to a bigger resolution.
-
Never let the video download on page load. For a self-hosted video, use
preload="none"and a poster image. The browser then loads only the small image, and fetches the video when the visitor presses play.For YouTube or Vimeo, use a “facade”: a lightweight preview image that is replaced by the real player only after a click.
Many WordPress performance plugins offer this as a setting (often called “replace YouTube iframe with preview image” or “lazy load videos”). If you prefer no plugin, the snippet in the deliverable below does it in a few lines.
-
Reserve the space. Give the video container a fixed aspect ratio (16:9) and set width and height on the poster image.
This stops the layout from jumping when the video area appears, which is what CLS measures.
-
Handle the poster image correctly for its position. If the video sits below the first screen, lazy-load the poster (
loading="lazy").If it is in the hero section, do the opposite: don’t lazy-load it, because it is probably the largest element on the screen and delaying it will hurt LCP.
Compress the poster to well under 200 KB.
-
Turn off autoplay with sound. Browsers block it anyway, and a muted autoplay loop forces the video to download immediately.
On a homepage, click-to-play is the faster and more respectful default.
-
Add captions and a clear label. Many visitors watch without sound. Add a captions track (self-hosted) or upload captions to YouTube.
Give the play button a label that says what the visitor will learn and how long it takes.
-
Measure again. Run PageSpeed Insights on the same URL, same device type. Compare LCP and CLS with your baseline.
Also test on a real phone over mobile data: press play and check that the video starts within a couple of seconds.
Worked example: Replyhaven’s homepage
As in our other Veozapp articles, we use a fictional product. Replyhaven is not a real company.
It is an AI customer-support tool for small support teams that drafts replies from the team’s existing help documents.
Replyhaven’s founder has a 75-second explainer video and wants it on the homepage, directly under the hero headline. Here is how the decisions play out:
| Decision | Replyhaven’s choice | Why |
|---|---|---|
| Hosting | YouTube, embedded with a facade | The founder also wants the video on YouTube for search, and does not want to pay for video bandwidth. |
| Position | Just below the hero headline, visible on desktop without scrolling | The video answers “what does it do?” right after the headline raises the question. |
| Poster image | A frame showing a drafted reply next to the help article it came from, with the text “See a reply drafted in 75 seconds” | It shows the product’s result, not a logo. |
| Poster loading | Not lazy-loaded on desktop, because it sits near the top of the page | Lazy-loading an image in the first screen delays LCP. |
| Captions | Uploaded to YouTube as an English .srt file | Most homepage visitors start with sound off. |
| Player behaviour | Click to play, privacy-enhanced domain (youtube-nocookie.com), no related videos from other channels | Nothing loads from YouTube until the visitor shows interest. |
The founder runs PageSpeed Insights before and after. The goal is not a perfect score. The goal is that LCP and CLS stay in the same range as before the video was added.
If they don’t, the first things to check are the poster image size and whether a plugin is still injecting the standard YouTube iframe.
The deliverable: an optimized video embed you can copy
Paste one of these snippets into a Custom HTML block on your homepage (or into your theme’s homepage template). Replace the file paths, the VIDEO_ID and the labels with your own.
If your site uses a performance plugin that already replaces YouTube embeds with a preview image, use the plugin instead of option B, so you don’t load two solutions.
Option A: self-hosted MP4
<video controls preload="none" playsinline
width="1280" height="720"
poster="/wp-content/uploads/replyhaven-poster.jpg"
style="width:100%;height:auto;aspect-ratio:16/9;">
<source src="/wp-content/uploads/replyhaven-explainer.mp4" type="video/mp4">
<track kind="captions" src="/wp-content/uploads/replyhaven-en.vtt" srclang="en" label="English" default>
</video>
What each part does:
preload="none"stops the browser from downloading the video before a click;postershows your still image;width,heightandaspect-ratioreserve the space;playsinlinekeeps the video in the page on iPhones;- the
trackline adds captions.
Option B: YouTube with a lightweight click-to-load facade
<div class="vz-video" style="position:relative;max-width:960px;aspect-ratio:16/9;">
<button type="button" class="vz-play" data-id="VIDEO_ID"
aria-label="Play the 75-second Replyhaven video"
style="all:unset;cursor:pointer;display:block;width:100%;height:100%;">
<img src="/wp-content/uploads/replyhaven-poster.jpg"
alt="Replyhaven explainer video: see a support reply drafted from your help docs"
width="1280" height="720" loading="lazy"
style="width:100%;height:100%;object-fit:cover;">
</button>
</div>
<script>
document.querySelectorAll('.vz-play').forEach(function (btn) {
btn.addEventListener('click', function () {
var f = document.createElement('iframe');
f.src = 'https://www.youtube-nocookie.com/embed/' + btn.dataset.id + '?autoplay=1&rel=0';
f.title = 'Replyhaven explainer video';
f.allow = 'autoplay; encrypted-media; picture-in-picture; fullscreen';
f.allowFullscreen = true;
f.style.cssText = 'position:absolute;inset:0;width:100%;height:100%;border:0;';
btn.parentNode.replaceChild(f, btn);
}, { once: true });
});
</script>
Until someone clicks, the page loads only your poster image and a few lines of script. The YouTube player is created on click and starts playing straight away.
If this video sits in your hero section, change loading="lazy" to loading="eager". It is worth adding a visible play icon on the poster image itself (built into the image) so visitors know it is a video.
Pre-publish checklist
- Baseline PageSpeed report saved (mobile and desktop)
- Video file compressed, or video uploaded to YouTube/Vimeo
- Poster image 1280×720, under 200 KB, shows the product’s result
- No video data loads before a click (
preload="none"or facade) - Container has a fixed 16:9 aspect ratio
- Poster lazy-loaded only if it is below the first screen
- No autoplay
- Captions available
- Play button label says what the viewer will learn and how long it takes
- After-measurement done; LCP and CLS comparable to baseline
- Tested on a real phone over mobile data
Common mistakes
- Pasting the default YouTube embed into the hero. It works, but it loads the full player for every visitor, including the majority who never press play.
- Uploading the raw export. A master file from your editor or video provider is made for quality, not for the web. Always create a compressed web version.
- Lazy-loading everything. Lazy-loading is right for content further down the page, but wrong for the main image in the first screen.
- Using a background autoplay video as the explainer. A silent looping background is decoration. If you want visitors to understand your product, give them a video they choose to play, with captions. (A muted autoplay version has its uses, but it needs its own setup.)
- Installing three plugins for one video. A lazy-load plugin, a video plugin and a page builder widget can each add their own scripts. One clean embed is usually faster than any combination.
- A poster that says nothing. A logo on a dark background gives visitors no reason to press play. Show the result your product produces.
- Forgetting mobile. Check that the video fits the screen width, that the play button is easy to tap, and that captions are readable on a small screen.
One more honest point: if your homepage copy doesn’t yet explain what your product does, a video won’t fix that alone.
Our guide on whether you need an explainer video or better website copy helps you decide which to work on first. And if you are still at the “is a quick Loom enough?” stage, a screen recording embedded the same way is a perfectly reasonable start.
Get more out of one video
Once the video is on your homepage and the page is still fast, the same file can work harder:
- in your onboarding emails,
- in sales replies,
- as short clips for LinkedIn,
- and on YouTube with chapters and captions.
If you don’t have a video yet, start with the script: our guide on writing a 60-second AI SaaS explainer script walks you through it.
