How can I make a responsive video autoplay and loop in Webflow, even on mobile devices?

TL;DR
  • Use a Webflow HTML Embed component with a <video> tag including autoplay, loop, muted, and playsinline attributes.  
  • Host the video externally (not in Webflow), apply responsive styles (width: 100%; height: auto;), and test on actual mobile devices.

To make a responsive video autoplay and loop in Webflow, including on mobile devices, you need to meet both design and technical requirements to bypass default browser restrictions.

​

1. Use the Correct Video Element

​

  • Use the HTML Embed element instead of the native Webflow Video element. The native element doesn’t support autoplay reliably across devices.
  • Drag an Embed component into your layout where you want the video to appear.

​

2. Add the Correct Video Embed Code

​

  • Use an HTML5 <video> tag inside the Embed with the following attributes:
  • autoplay
  • loop
  • muted (required for autoplay on mobile)
  • playsinline (prevents fullscreen takeover on mobile)

​

  • Embed a code like this inside the Embed element (replace the src with your actual hosted video URL—preferably from Amazon S3, Dropbox direct link, etc.):

  

  <video autoplay loop muted playsinline style="width:100%; height:auto;" loading="lazy">

    <source src="YOURVIDEOURL.mp4" type="video/mp4">

  </video>

​

3. Host the Video Properly

​

  • Upload your .mp4 to a reliable external host that allows direct file access (e.g., AWS S3, Cloudinary, or Dropbox with modified links).
  • Do not host videos directly in Webflow—the Asset Manager doesn’t provide a direct .mp4 link suitable for embedding with the <video> tag.

​

4. Style for Responsiveness

​

  • Set the style attribute in the <video> tag to width: 100%; height: auto; for full responsiveness across screen sizes.
  • Alternatively, you can control sizing and responsiveness via Webflow's style panel by placing the Embed element inside a div block set to relative sizing.

​

5. Test on Actual Devices

​

  • Mobile browsers may block autoplay unless muted and playsinline are both used.
  • Always verify on real mobile devices, not just browser dev tools.

​

Summary

​

To autoplay and loop a responsive video in Webflow across all devices, embed the video using the <video> tag with autoplay, loop, muted, and playsinline, ensure you host the file externally, and set responsive styling using %-based widths. Avoid Webflow’s native video component, which lacks full autoplay and loop control.

Rate this answer

Other Webflow Questions