Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialbettymakes
1,683 PointsDoes order matter here? srcset="photo-@2x.jpg 2x, photo@-1x.jpg 1x" vs. srcset="photo-@1x.jpg 1x, photo-@2x.jpg 2x"
Does it matter whether you list the larger resolution photo first before the smaller resolution?
4 Answers
Blaize Pennington
13,879 PointsAccording to Mozilla.org not only does the order not seem to matter, but the 1x picture can be used as your src element and your 2x as your srcset. You don't need to type it twice.
channonhall
12,247 PointsNick says you need to put the larger picture first, like you have it, but whether you ABSOLUTELY MUST do it, or it won't work, I don't know. Hope that helps! :)
btw Maureen O'Neal if you comment on this question the guy that post this... will not receive a notification
Maureen O'Neal
12,930 PointsNick says you need to put the larger picture first, like you have it, but whether you ABSOLUTELY MUST do it, or it won't work, I don't know. Hope that helps! :)
Maureen O'Neal
12,930 PointsThanks for the info! :)
channonhall
12,247 PointsYour welcome :)