Embed videos from Google Drive

Reuse a video already in Google Drive on a page without uploading another copy to the CMS. Check sharing permissions before publishing.

By Darryl Waterhouse · · 2 min read

If a demonstration video already lives in Google Drive, you can embed that file on a page rather than uploading another copy to the CMS. Google serves the embedded video, reducing the video traffic handled by your site. Check the file's sharing permissions and test it signed out; availability depends on Google and the file remaining accessible.

The [embed] shortcode has always played YouTube and Vimeo videos. From Domma CMS 1.98.3, now on every site, it understands Google Drive links too, and Google Docs, Sheets and Slides.

In the page editor, choose Insert > Embed and paste the link Drive gives you when you click Share > Copy link. There is nothing to change in it. The panel tells you it has spotted a Drive link, and reminds you to share the file as Anyone with the link.

Insert embed with a Google Drive link pasted: Detected: Google Drive (share it as "Anyone with the link")

Or type it straight into the page:

[embed url="https://drive.google.com/file/d/your-file-id/view?usp=sharing" title="Factory tour" /]

The video plays in Google's own player. It comes from Google's servers straight to your visitor, just like YouTube, so a popular video does not use your site's bandwidth.

Not just videos

  • A Drive folder link shows the list of files in the folder. Each one opens in Drive.
  • A Google Docs, Sheets or Slides link shows the document on your page, read only. Edit it in Google and the page shows the change. Handy for a price list, a timetable or a sign-up sheet.

A Google Sheet embedded on a page, with a caption underneath

The usual options work: ratio (try 4:3 or 3:4 for documents), title for a caption, width and align.

Good to know

  • Share it first. In Drive, set the file to Anyone with the link. If you do not, visitors see a Google sign-in box instead of your video.
  • Autoplay and loop do not work with Drive; they are YouTube and Vimeo options.
  • Very popular videos: if a Drive file gets a lot of views, Google can pause it for a while with a "too many users have viewed" notice. For a video you expect thousands of people to watch, an Unlisted YouTube video is the better home: it is free, has no limit, and only people with the link can find it.
  • No setup. Drive is allowed on every site, like YouTube, so there is no list of allowed websites to change.