Vimeo shortcode
Embed a Vimeo video in your content using the vimeo shortcode.
Example
To display a Vimeo video with this URL:
https://vimeo.com/19899678Include this in your Markdown:
{{< vimeo 19899678 >}}Hugo renders this to:
Arguments
id- (string) The video
id. Optional if theidis the first and only positional argument. allowFullScreen- New in v0.146.0
- (
bool) Whether theiframeelement can activate full screen mode. Default istrue. class- (
string) Theclassattribute of the wrappingdivelement. Adding one or more CSS classes disables inline styling. loading- New in v0.146.0
- (
string) The loading attribute of theiframeelement, eithereagerorlazy. Default iseager. title- (
string) Thetitleattribute of theiframeelement.
Here’s an example using some of the available arguments:
{{< vimeo id=19899678 allowFullScreen=false loading=lazy >}}Privacy
Adjust the relevant privacy settings in your project configuration.
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, the video thumbnail is fetched from Vimeo and overlaid with a play button. Clicking the thumbnail opens the video in a new Vimeo tab. Default isfalse.
The source code for the simple version of the shortcode is available in this file.
To override Hugo’s embedded vimeo shortcode, copy the source code to a file with the same name in the layouts/_shortcodes directory.
Last updated:
October 29, 2026
:
content: Refine callout usage across the site (711fe3a35)
Improve this page