atie hoseinpour
atie hoseinpour

Reputation: 29

How to add a poster image for video lightbox?

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>

Upvotes: 0

Views: 340

Answers (1)

Alex Mac
Alex Mac

Reputation: 2993

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>

Upvotes: 0

Related Questions