xfe.li

Firefox Fun: Broken Lazy loading

2023-06-30 • Félix Dorn

Firefox has a weird quirk01, where this won’t lazy load the image:

1<img src="..." loading="lazy"/>

But this will:

1<img loading="lazy" src="..."/>

The loading attribute must come before the source attribute. This bug is specific to firefox and the loading attribute works as expected on chromium-based browsers.

I encountered this bug today, and it was nice to have a reminder that there is still some diversity in browser rendering engines.