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 trial

HTML Responsive Images Image Delivery with Srcset and Sizes Srcset with Picturefill

lihaoquan
lihaoquan
12,045 Points

1X vs 2X displays

Can anyone explain to me what is the difference between 1x and 2x displays? And what does he mean by @2x image and @1x image in this video?

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi there Li,

1x and 2x are just ways of defining an image that has a certain amount of pixel resolution. A 2x image has a higher resolution but has twice the width and height of a 1x image.

However if you used the srcset element in your code you can define a 2x media descriptor that scales down your image but you get the increased resolution at the size on screen on a 1x image.

To get a 2x image you save the revelent settings in a settng like "save for web and devices" in an application like Photoshop or Fireworks.