Kirby built-in Vimeo embed automatically cleaning up embed link

This is not possible using the video helper. You can, however, use the embed class:

<figure class="video-embed">
  <?=  embed::vimeo($data->link(), ['options' => ['background' => 1]]);?>
</figure>

The attribute array here contains an options array. Everything in the options array is used to build the query string.


To give you a bit more background: internally, the vimeo Kirbytag (which is then used by the vimeo() helper via the kirbytag() helper) uses the vimeo() method from the Embed class.

While the helper and the tag accept a URL, they really only need the video ID, therefore everything but the ID is stripped from the URL to build the src attribute of the iframe.

4 Likes