Riff / Built on the open web / Media
Async decoding
Decodes cover art off the main thread so the seek line does not stutter.

How Riff uses it
Every image the player prints carries decoding="async": the large cover and the two thumbnails in the template, each row and queue item, and each library card. The off-screen image loaded to sample a cover's colour sets it too.
Why
The cover swaps on every track change while the seek line is animating each frame, and a synchronous decode would drop a frame.
Without it
Browsers without the hint decode as usual.
Where
- plugins/riff/templates/player.php, line 89
<img class="riff-cover" data-riff-art data-riff-size="large" alt="" decoding="async" draggable="false" hidden> - plugins/riff/assets/riff.js, line 1427
img.decoding = 'async';
Links open the source at the commit this page was published from.
Reference: Async decoding on MDN.