digitoimistodude / air-light

💨 WordPress starter theme - designed to be minimal, ultra-lightweight (< 20 kB) and easy for all kinds of WordPress projects. 7+years/1000+hours of development and still updating daily! We prefer the original WordPress way of doing things so no strange templating languages or frameworks here.
https://airwptheme.com
MIT License
945 stars 142 forks source link

Lazy loading attribute #133

Closed iniznet closed 2 years ago

iniznet commented 2 years ago

Considering add lazy loading attribute to img tag for browser who support it, otherwise load the lazyload js. Something like:

if ( // check if browser support lazy loading attribute ) {
} else {
  // browser doesn't support it, so load the lazyload js
} 

As it explained here: lazy loading article Although current caniuse still around 70%: caniuse

I think it would be great if it was implemented by default without needing to edit the JS every time we set up the starter theme.

ronilaukkarinen commented 2 years ago

This is on our roadmap and actually more like air-helper related issue.

I have moved your issue here.