youtube - Liquid Filter Reference - 1.0.0

Filter Name youtube
Group Videos
Version 1.0.0

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 1.0.0

 

 
Back to Documentation