youtube - Liquid Filter Reference - 0.11.4

Filter Name youtube
Group Videos
Version 0.11.4

Description

Returns HTML embed code for the supplied YouTube id

Examples

{{ "12345-abcde" | youtube }}
<div class="responsive-iframe"><iframe src="https://www.youtube.com/embed/12345-abcde?start=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen class="Video_embed youtube"></iframe></div>

Options

start_at

Moves the playback starting position of the video forward by this number of seconds

When start_at is provided, it adjusts the embed code for the requested start time:
{{ "12345-abcde" | youtube, start_at: 927 }}
<div class="responsive-iframe"><iframe src="https://www.youtube.com/embed/12345-abcde?start=927" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen class="Video_embed youtube"></iframe></div>

Back to Filter List

Back to Liquid Reference for 0.11.4

 

 
Back to Documentation