Hacker News new | ask | show | jobs
by Qub3d 2378 days ago
Alright, I've gone ahead and replaced the css background-image with a <picture> element, with fallbacks:

<div class="imgbox center-fit">

<picture>

<source srcset="files/webp/file.webp" type="image/webp">

<source srcset="files/file.jpg" type="image/jpg">

<img src="files/file.jpg" alt="Bunny!">

</picture>

</div>

Let me know if that works.