Skip to content
UI/UX Atlas
Topics
Patterns
Color Tool
Templates
Quizzes
Topics
Patterns
Color Tool
Templates
Quizzes
Quizzes
/
Responsive & Platform
Responsive Images: srcset, picture & Modern Formats — Quiz
5 questions
·
Read the lesson first →
Question 1 of 5
Responsive Images: srcset, picture & Modern Formats
A developer writes: <img srcset='hero-1x.jpg 1x, hero-2x.jpg 2x' sizes='100vw' alt='...'> on a hero image. What is the core problem with this approach?
The x descriptor approach ignores the sizes attribute entirely and selects candidates based only on device pixel ratio, not viewport width — wasting bandwidth on narrow high-DPI screens
Using x descriptors is fine; the real issue is that sizes='100vw' is too vague for the browser to optimize
The srcset needs a src fallback attribute in addition to the srcset candidates
x descriptors are only valid inside a picture element, not on a standalone img tag
Check answer