Given the following video element:
<video class="Hero__video" width="1280" height="720" preload="true" autoplay="true" loop="loop" muted="muted" volume="0" poster="/assets/hero-cover.jpg">
<source src="/assets/hero.webm" type="video/webm">
<source src="/assets/hero.mp4" type="video/mp4">
</video>
Is there a way to set the poster to be webp with a fallback to jpg?
From my understanding, the only work around is to have an element positioned absolutely below it:
<picture class="Hero__poster">
<source srcset="/assets/hero-cover.webp" type="image/webp">
<source srcset="/assets/hero-cover.jpg" type="image/jpeg">
<img src="/assets/hero-cover.jpg">
</picture>