Images & Videos
Enhance your documentation with images and video embeds.
Static Assets
Place images and videos in docs/public/. During build, these files are copied to the root of your site.
-
docs
-
public
-
images
- logo.png
-
videos
- demo.mp4
-
images
-
public
Reference them with root-relative paths:

::video[/videos/demo.mp4]
Images
Basic Image

With Caption
Add a caption using the caption attribute:
With Dimensions
Control image size with width and height:

Disable Lightbox
Prevent the image from opening in a lightbox:

YouTube
Embed YouTube videos with privacy-friendly mode (no cookies):
With Start Time
Start the video at a specific time:
Vimeo
Embed Vimeo videos with Do Not Track enabled:
Native Video
You can also host your own video files. Place them in docs/public/ and reference them using the syntax shown below.
Syntax
Images:

{caption="Figure caption"}
{width="600" height="400"}
{nozoom}
{caption="Caption" width="600" nozoom}
YouTube:
::youtube[VIDEO_ID]
::youtube[VIDEO_ID]{start="30"}
::youtube[VIDEO_ID]{autoplay muted loop}
Vimeo:
::vimeo[VIDEO_ID]
::vimeo[VIDEO_ID]{autoplay muted}
Native Video:
::video[/path/to/video.mp4]{controls}
::video[/path/to/video.mp4]{controls autoplay muted loop}
::video[/path/to/video.mp4]{controls poster="/poster.jpg" preload="metadata"}
Reference
Image Attributes
| Attribute | Description |
|---|---|
caption |
Figure caption text |
width |
Image width in pixels |
height |
Image height in pixels |
nozoom |
Disable lightbox on click |
Video Attributes
| Attribute | YouTube | Vimeo | Native | Description |
|---|---|---|---|---|
start |
Yes | - | - | Start time in seconds |
autoplay |
Yes | Yes | Yes | Auto-start playback |
muted |
Yes | Yes | Yes | Mute audio |
loop |
Yes | Yes | Yes | Loop playback |
controls |
Yes | Yes | Yes | Show player controls |
poster |
- | - | Yes | Preview image URL |
preload |
- | - | Yes | auto, metadata, or none |
playsinline |
- | - | Yes | Inline playback on mobile |
nofullscreen |
Yes | Yes | - | Disable fullscreen |
width |
Yes | Yes | Yes | Player width |
height |
Yes | Yes | Yes | Player height |
title |
Yes | Yes | - | Accessibility title |
Privacy
- YouTube: Uses
youtube-nocookie.com(no tracking cookies) - Vimeo: Uses
dnt=1parameter (Do Not Track)
Image credit: Photo by Christopher Becke on Pexels. Video credits: BBC Earth on YouTube, Yosemite Winter Wonders by Rudy Wilms on Vimeo.
Was this page helpful?
Thanks for your feedback!