0

I have a video to display in my Nuxt app. When pointing the videos poster attribute to an image, it doesn't display. As a test, i created an image element pointing towards the same location and the image displays.

Question

How can I display the poster for a video?

<div>
  <video controls preload="none" poster="../static/images/videoposter.png">
    <source src="../static/video/Websitemp4.mp4" type="video/mp4">
    Your browser does not support HTML5 video.
 </video>
</div>

Que
  • 957
  • 2
  • 14
  • 35

1 Answers1

0

If the path to your image is /static/images/video poster.png then use src="/images/videoposter.png"

You don’t need to use a relative path, as you have in your code example.

Nick Dawes
  • 2,089
  • 1
  • 13
  • 20