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

CSS

It is good practice to use different background images for different screen sizes?

The same image but in different sizes to adjust properly to different screen sizes.

I know there is background-size: cover, but sometimes if the image is too big, it doesn't fit well on small screens.

1 Answer

I would give Adaptive Images a try.

"Adaptive Images detects your visitor's screen size and automatically creates, caches, and delivers device appropriate re-scaled versions of your web page's embedded HTML images. No mark-up changes needed. It is intended for use with Responsive Designs and to be combined with Fluid Image techniques."

Not exactly what your looking for but the concept of delivering different images based on the screen size is there. Maybe with some googling you could find an exact solution or try modifying the adaptive images?

http://adaptive-images.com/