Here we have more lossy tests of AVIF and WebP comparing to JPEG or PNG, but with the much smaller resolution and very close file size for testing the real-life usages. By using the <picture> tag, the priority is AVIF, WebP, and JPEG/PNG so all browsers can display.
<picture>
<source srcset="photo.avif" type="image/avif">
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="">
</picture>