How to add a poster image for video lightbox?

304 Views Asked by At

I have a question about poster in Lightbox v2.9.0 .i have image and video in my gallery that open in lightebox and I need to set the part of video as poster_ image .how can I do this? this is my jquery code for gallery:

<a href="/rest/file/content/test" data-type="video" data-toggle="lightbox" rel="lightvideo">    
<img class="img-responsive img-fluid"  src="/rest/file/content/test.mp4">
</a>
1

There are 1 best solutions below

1
Alex Mac On

You can use below mentioned code, It will help you.

<a href="/rest/file/content/test.mp4" class="wplightbox" data-type="video" data-toggle="lightbox" data-html5videoposter="https://www.wonderplugin.com/wp-content/uploads/2014/03/gallery.jpg">Video Lightbox</a>