Cloud pictures & videos demo

This page has a picture and a video in it — but neither file lives in this site's folder. They are hosted off-site on the cloud, so this whole site is still only a few KB, far under the 1.5 MB limit. Only files stored in the site folder count toward the limit.

A cloud picture

A man with a camera, hosted on Unsplash (cloud image host)

This photo is hosted on Unsplash — a cloud image host. The page just links to it.

A cloud video

This video is hosted on Pexels (cloud video host). Use preload="metadata" so the page loads fast and only fetches the video when someone presses play.

How to do it yourself

Upload your picture/video to Dropbox, Google Drive, TeraBox (or any host that gives a direct link), then link to it — don't upload the file into your site folder:

Dropbox

Share the file, then change the end of the link from ?dl=0 to ?raw=1:

<img src="https://www.dropbox.com/s/YOURFILEID/photo.jpg?raw=1" alt="My photo">

Google Drive

Share the file as “Anyone with the link”, copy its file ID from the share URL, then use:

<img src="https://drive.google.com/uc?export=view&id=YOUR_FILE_ID" alt="My photo">

<video controls preload="metadata"
  src="https://drive.google.com/uc?export=download&id=YOUR_FILE_ID"></video>

Google Drive sometimes throttles big video files — for video, Dropbox or TeraBox direct links are smoother.

TeraBox

Share the file, open the share link and copy the direct download link TeraBox gives you, then use it the same way:

<img src="https://YOUR_TERABOX_DIRECT_LINK" alt="My photo">

Any direct link works

<img src="https://example-cloud-host.com/my-photo.jpg" alt="My photo">
<video controls preload="metadata" src="https://example-cloud-host.com/my-video.mp4"></video>

Rule of thumb: if the link opens the picture/video directly in a browser tab, it will embed in your page. If it opens a preview page instead, find the “direct link” / “raw” version.

← Back to static sites