Skip to main content

Defer YouTube/Vimeo Video module

Purpose and when to use

The Defer YouTube/Vimeo Video module shows a preview image and loads the player only after play. Use it instead of a standard Divi Video module when embeds would otherwise slow the first load.

  • Divi 4: Add Defer YouTube/Vimeo Video
  • Divi 5: Add the same module in the Visual Builder (existing Divi 4 modules can convert)

Global YouTube player defaults (autoplay, mute, colour, controls) live under Divi Engine → Nitro Settings → Defer Video Module. See the feature guide.

Quick setup workflow

  1. Add the module to the layout.
  2. Set Video Source to YouTube, Vimeo, or ACF Oembed.
  3. Enter the Video ID, or choose ACF fields when using dynamic video.
  4. Upload a preview image or let Nitro pull a thumbnail.
  5. Set aspect ratio and privacy-enhanced embed as needed.
  6. Style the play icon in Design.
  7. Save and test play, keyboard focus, and autoplay (if you use it).

Content tab

SettingTypeDefaultWhat it does
Video SourceSelectYouTubeYouTube, Vimeo, or ACF Oembed
Video IDTextemptyID from the video URL (the part after = or /). Hidden when source is ACF
ACF FieldSelectemptyACF oembed field that contains the video. Shown when source is ACF
Preview Image (ACF)SelectemptyACF image field for the poster when source is ACF
Preview Image (upload)ImageemptyCustom poster. Nitro can pull a YouTube/Vimeo thumbnail if you leave this empty
Image Alternative TextTextemptyALT text for the preview image
Privacy-Enhanced EmbedToggleOnUses YouTube nocookie and Vimeo do-not-track hosts when the visitor plays
Aspect RatioSelect16:916:9, 4:3, 1:1, 21:9, or Custom
Custom Aspect RatioTextemptyRatio like 16:9 or padding percent like 56.25%
Play Button LabelTextemptyAccessible name for the play control. Defaults to “Play video”

Design tab

SettingTypeDefaultWhat it does
Play IconIconDivi play iconIcon shown on the preview
Play Icon ColorColor#ffffffIcon colour, including hover and mobile

Standard Divi spacing, background, border, and overlay options also apply.

Global Nitro Settings (YouTube defaults)

These apply when the iframe loads. Configure them in Nitro Settings, not only on the module:

SettingTypeDefaultWhat it does
AutoplayToggleOnStart playback when the iframe loads. Pair with mute for browser autoplay
Mute on AutoplayToggleOffMute so autoplay is more likely to succeed
ColorSelectRedYouTube progress bar white or red
ControlsToggleOnShow player controls
FullscreenToggleOnAllow fullscreen
LoopToggleOffLoop the video
RelToggleOnRelated videos after the current video ends

Verify

  1. View the page logged out. The initial HTML should not include a heavy YouTube/Vimeo iframe.
  2. Click or tab to the play control and confirm the player appears.
  3. If autoplay is on, confirm mute is on as well.

What's Next