How to add a video background to a hero section in Squarespace

Updated

In Squarespace 7.1, edit your top section, open Edit Section → Background → Video, upload an MP4 (up to 60 seconds and 500 MB) and set a mobile fallback image. It plays silently on a loop behind your content.

A seamless 3D hero loop: the kind of video this guide is about

Option 1: a section background video

  1. 1Click Edit on the page, hover the top section and choose Edit Section → Background → Video.
  2. 2Upload a file, pick one from your library, or paste a YouTube or Vimeo link (Vimeo needs a paid Vimeo plan).
  3. 3Set a Mobile fallback image, which shows while the video loads or when it can't play.
  4. 4Adjust Filter and Playback Speed, choose Full Bleed or Inset, then save and preview on a phone.

Limits to know

  • Uploads must be .mp4, .m4v or .mov, up to 500 MB and 60 seconds. WebM isn't accepted.
  • Every site gets 30 minutes of video storage.
  • Devices in low-power mode don't display background videos, which is why the fallback image matters.
  • Squarespace recommends no more than two background videos per page.

Option 2: a Code Block

A Code Block lets you use your own player or a transparent video. JavaScript and iframes in Code Blocks need a Core, Plus or Advanced plan.

  1. 1Host your video files at public HTTPS URLs.
  2. 2In the section, choose Add Block → Code, set Mode to HTML, and paste the snippet below.
  3. 3Code may not render while you're logged in. Check it with Preview in Safe Mode or in a private window.
HTML
<section class="hero">
  <video class="hero__video" autoplay muted loop playsinline
         preload="metadata" poster="/hero-poster.webp" aria-hidden="true">
    <source src="/hero-loop.av1.webm" type='video/webm; codecs="av01.0.08M.10"'>
    <source src="/hero-loop.mp4" type="video/mp4">
  </video>
  <div class="hero__content">
    <h1>Your headline</h1>
  </div>
</section>

<style>
  .hero { position: relative; isolation: isolate; min-height: 90vh; overflow: hidden; }
  .hero__video { position: absolute; inset: 0; z-index: -1;
                 width: 100%; height: 100%; object-fit: cover; }
  @media (prefers-reduced-motion: reduce) {
    .hero__video { display: none; }
    .hero { background: url(/hero-poster.webp) center / cover; }
  }
</style>

For a script every page needs, use Settings → Code Injection (Core, Plus, Advanced and some legacy plans).

Things that trip people up

  • Export H.264 MP4, not WebM, for the native background, since WebM uploads aren't accepted.
  • Keep important text away from the edges: Full Bleed crops the video differently on phones.

The one-line version

Edgeloop loops ship with a small player that does all of the above for you: the right format per browser, a poster while it loads, pausing off-screen, reduced-motion support and a transparent version for your own background.

<script src="https://edgeloop.studio/hero-loop.js" defer></script>
<hero-loop src="/loops/your-loop/" focus="right center"></hero-loop>

Collection 01 opens soon. Join the waitlist for 3 free loops.

Your first free loop arrives by email right away. No spam.

Questions

Can I use a WebM background video in Squarespace?

Not with the native section background, which accepts .mp4, .m4v and .mov. You can use WebM in a Code Block on Core and higher plans.

Why isn't my Squarespace background video playing on iPhone?

Devices in low-power mode don't display background videos. Set a mobile fallback image so the section still looks right.

Sources

Same guide for other builders