HTML Guide for poster
An empty value for the poster attribute on a video element is not valid; the attribute must contain a non-empty URL.
The poster attribute specifies an image to show before the user plays the video. According to the HTML living standard and W3C specifications, if the poster attribute is present, it must have a non-empty value that is a valid URL to an image resource. Using poster="" is invalid and triggers validator errors.
If you do not want to show any poster image, simply omit the poster attribute altogether. If you want to show an image, provide a valid image URL as the value.
Valid examples:
Video without a poster (omit the attribute):
<video controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Video with a poster image:
<video controls poster="thumbnail.jpg">
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Invalid (causes error):
<video controls poster="">
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Always either use a valid URL in the poster attribute or omit it entirely to ensure HTML validity.
Spaces in the poster attribute value are not valid in URLs and must be percent-encoded as %20.
The poster attribute on the video element specifies an image to show until the user plays or seeks the video. Attribute values that represent URLs (such as in src, href, or poster) must use valid URI syntax, meaning spaces are not allowed. Spaces must be replaced with %20, or you can use a path that avoids spaces entirely.
Example — Incorrect:
<video controls poster="/img/video images/snapshot.png">
<source src="/videos/sample.mp4" type="video/mp4">
</video>
Example — Fixed with percent-encoding:
<video controls poster="/img/video%20images/snapshot.png">
<source src="/videos/sample.mp4" type="video/mp4">
</video>
Example — Fixed by removing spaces from the folder name:
<video controls poster="/img/video-images/snapshot.png">
<source src="/videos/sample.mp4" type="video/mp4">
</video>
Always encode any space in URLs as %20 or avoid spaces in file and folder names.