HTML & CSS · Middle · Question 23 of 75

What does loading="lazy" on <img> do, and when should you NOT use it?

Explanation

Native lazy loading saves bandwidth for below-the-fold images. But for a hero image it's harmful: the browser starts loading later and LCP suffers. For an important image, use fetchpriority="high" instead. The attribute has nothing to do with compression or formats.

Further reading

Problem with a question

HTML & CSS · Middle · question 23

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz