All jobs / Frontend / web developer / Performance
Frontend / web developer interview question · 1–3 years
LCP is a hero image. What do you change first?
The strongest answer
Prioritize it — fetchpriority high, real dimensions, a modern format, a CDN — and do not lazy-load the LCP image
Why it works
LCP wants the hero discovered early and lightweight. Lazy-loading it delays the metric on purpose.
What a good answer covers
- Help the hero, don't hide it.
- Discover it in the first HTML.
- Right size, modern format, high priority.
- Never lazy-load the LCP image.
Answers that fall short
- Close, but not the strongest: Lazy-load the hero so it 'doesn't block'
loading=lazy on the LCP image is a common own-goal. - Weak: Serve a larger JPEG at quality 100
Bigger files make LCP worse. - Red flag: Block rendering on an A/B script before the image
Third-party scripts in the head often steal the first megabytes.
Who gets asked this
More Performance questions
- Clicking Filter freezes the tab for about 400ms. How do you investigate?
- Product asks if the new home is faster. What do you report?
- How do you ingest Web Vitals without drowning the backend or leaking PII?
- How do you keep marketing JS from growing without anyone noticing?
- Ten thousand rows in a div and the tab dies. What do you do?
- A feature flag flips the hero after hydrate (flicker). How do you prevent it?
- An SSR page waits for user, then cart, then recommendations, sequentially. What's the issue and the fix?
- A content site with a few interactive widgets — full CSR SPA or islands / edge?