You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if you use the interactive embed and the user has JS activated, the fallback image will still be loaded, despite never beeing shown. This can be easily avoided by adding loading="lazy" to the img-Element. Most browsers support it already, and those wo don't just ignore the attribute: https://caniuse.com/#feat=loading-lazy-attr
I tested this in Firefox and Chromium-Edge, and it works fine. As far as I understand the native lazy-loading attribute can be added without risk or downsides, and we could save time, money, CO2 etc.
Example:
<p class="ciu_embed" data-feature="dialog" data-periods="future_1,current,past_1,past_2" data-accessible-colours="false">
<picture>
<source type="image/webp" srcset="https://caniuse.bitsofco.de/image/dialog.webp">
<source type="image/png" srcset="https://caniuse.bitsofco.de/image/dialog.png">
<img loading="lazy" src="https://caniuse.bitsofco.de/image/dialog.jpg" alt="Data on support for the dialog feature across the major browsers from caniuse.com">
</picture>
</p>
The text was updated successfully, but these errors were encountered:
Right now, if you use the interactive embed and the user has JS activated, the fallback image will still be loaded, despite never beeing shown. This can be easily avoided by adding loading="lazy" to the img-Element. Most browsers support it already, and those wo don't just ignore the attribute:
https://caniuse.com/#feat=loading-lazy-attr
I tested this in Firefox and Chromium-Edge, and it works fine. As far as I understand the native lazy-loading attribute can be added without risk or downsides, and we could save time, money, CO2 etc.
Example:
The text was updated successfully, but these errors were encountered: