Interview practice question
A lazy loading library delays the main image
Frontend Engineering · Web Performance · Intermediate
After adding a JavaScript lazy loading library to all images, LCP got worse. Why, and how do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- LCP image waits for JS to run.
- Exclude above-the-fold images.
- Use native loading="lazy" instead.
- fetchpriority on hero.
- Measure again.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.