DEV Community

Discussion on: Responsive background images with image-set, the srcset for background-image

Collapse
 
ingosteinke profile image
Ingo Steinke

Agreed, the server should optimize images, like a CMS handling uploaded image files and generating different optimized versions in different sizes. Then the CMS theme can use source set markup to let the browser decide which image is the most appropriate while saving unnecessary bandwidth.

I have added code examples for complex image / picture source sets and explicitly stated in my conclusion that currently I would not use background images with image-set as long as using actual image tags is an option.