Looping Video Backgrounds for Websites: Best Practices
By the FreeAssetHub team · October 28, 2026 · 6 min read
A subtle moving background can make a landing page feel alive. Done badly, it slows the page, distracts from the message and frustrates users on slow connections. These best practices keep video backgrounds elegant and fast.
Keep the clip short and the file small
A background loop does not need to be long. Five to fifteen seconds is usually plenty. Aim for a file of a few megabytes at most, because the video competes with everything else on the page. Lower the frame rate to 24 or 30 frames per second, trim extra seconds, and export at a resolution matched to the screen, such as 1280 by 720 or 1920 by 1080.
Use a widely supported format
MP4 with H.264 plays on nearly every browser and device. If you want to go further, you can add a WebM version as an alternative source so that browsers choose the most efficient format. Our guide on MP4, MOV and GIF explains the differences.
The essential HTML
For a background that plays automatically, the video usually needs to be muted and set to play inline. A typical setup uses these attributes: autoplay, muted, loop, playsinline. Add a poster image so that something appears immediately while the video loads, and so that visitors with data saving enabled still see a picture.
Protect readability
- Overlay a semi-transparent dark or coloured layer so text stays legible.
- Choose calm, low-contrast motion such as gradients, soft particles or slow shapes.
- Avoid busy footage behind headings and buttons.
Respect accessibility
Some visitors are sensitive to motion. Use the prefers-reduced-motion media query to stop the video and show the poster image instead. Never rely on video to carry important information, and do not include audio in a background clip. If the video plays for a long time, give users a way to pause it.
Do not make mobile pay the price
Many mobile users are on limited data. Consider serving the video only on larger screens and a static image on phones. Loading the video lazily, after the main content appears, also protects your page speed scores.
Choose loops that really loop
The best background clips have continuous motion, so that the end flows naturally into the start. Rotating objects, drifting shapes, flowing waves and endless gradients work well because there is no visible jump. If you see a flicker or pause at the loop point, pick another clip or trim it.
Checklist
- Short clip, small file
- MP4 (and optionally WebM)
- Muted, looped, inline, with a poster image
- Overlay for text contrast
- Reduced-motion fallback
- Static image on small screens if needed
You can preview and download free looping clips in our video and animation collection.