How can I add custom attributes to a video tag?

Is there a way to add custom attributes to {{ media | video_tag }} ?

I’d like to add attributes that would output to:

Hi @arlentan Hope you are doing well
Try this
{{ media | video_tag: loop:“loop”, muted:true, playsinline:true , autoplay:true, onclick:“function();”, id:“featured_video”, style:“display:none” }}

2 Likes

This was exactly the syntax I was looking for, thank you!