Vimeo shortcode
Embed a Vimeo video in your content using the vimeo shortcode.
Usage
The vimeo shortcode embeds the Vimeo video with the given ID. The ID is the last segment of the video’s URL. For example, the ID of the video at https://vimeo.com/19899678 is 19899678.
Adjust the privacy settings for this shortcode in your project configuration. These are the default settings:
privacy:
vimeo:
disable: false
enableDNT: false
simple: false
[privacy]
[privacy.vimeo]
disable = false
enableDNT = false
simple = false
{
"privacy": {
"vimeo": {
"disable": false,
"enableDNT": false,
"simple": false
}
}
}
disable- (
bool) Whether to disable the shortcode. Default isfalse. enableDNT- (
bool) Whether to block the Vimeo player from tracking session data and analytics. Default isfalse. simple- (
bool) Whether to enable simple mode. Iftrue, Hugo fetches the video thumbnail from Vimeo and overlays it with a play button. Clicking the thumbnail opens the video on Vimeo in a new browser tab. Default isfalse.
To override Hugo’s embedded vimeo shortcode, copy the source code to a file with the same name in the layouts/_shortcodes directory. To override simple mode, also copy the simple mode source code.
Arguments
The vimeo shortcode accepts either a single positional argument, the video ID, or named arguments. Do not mix positional and named arguments.
allowFullScreen- New in v0.146.0
- (
bool) Whether theiframeelement can activate full screen mode. Default istrue. class- (
string) Theclassattribute of the wrappingdivelement. When specified, removes thestyleattributes from theiframeelement and its wrappingdivelement. id- (
string) The ID of the Vimeo video. Required when using named arguments. loading- New in v0.146.0
- (
string) Theloadingattribute of theiframeelement, eithereagerorlazy. title- (
string) Thetitleattribute of theiframeelement.
Examples
content/example.md
{{< vimeo 19899678 >}}Your browser displays this:
With named arguments:
content/example.md
{{< vimeo id=19899678 loading=lazy title="A Vimeo video" >}}Your browser displays this:
Last updated:
November 16, 2026
:
content: Apply style guide to shortcodes section (bd893690d)
Improve this page