Your own browser saves the winners’ photo as JPEG, WebP and AVIF at your quality; a real <picture> picks its file for your width and screen density. An…
Why it matters
Images are almost always the heaviest part of a page, and the hero photo is often the LCP element. Modern formats and the right width can cut most of its bytes with no visible difference; too high a quality and sources in the wrong order throw all of that away.
The key idea
The browser chooses from the list you write, in order
Common mistakes
The sources in the wrong order, AVIF unused The browser uses the first <source> whose type it knows and stops there. With WebP written before AVIF, a browser that can do AVIF still takes WebP. Write AVIF first, then WebP, then the JPEG <img>.
The layout jumps when the picture’s image loadswidth and height go on the <img> inside the <picture>, and they apply to every source: their ratio keeps the room before any file arrives. Without them the height is 0 until the photo comes.
Quality 95 to be safe, but the file is huge Above about 0.8 the bytes climb much faster than any visible difference. For photos start at 0.6 to 0.8 and compare by eye; icons and text suit SVG or PNG better.
Try it in this playground
Raise the quality to 0.95 Compare the JPEG’s size with 0.75.
Swap the source order: WebP first See which format the browser picks.
Change the screen density to 2× or 3× The file picked gets wider with it.
Take width and height off How tall is the photo before it arrives?