Why use Srcset?
Episerver CMS 11
Image Processor 5.8
Over the last couple of years, usage of srcset has picked up traction with clients as an easy way to implement responsive images. You can empower the requesting browser to select an image from a list you specify. This example contains two images the browser can pick between depending on if the viewport has hit at least 480px or 800px.
<img srcset="ImageOne.jpg 480w,
ImageTwo.jpg 800w"
sizes="auto"
src="ImageFallBack.jpg">
Using Image Processor we can optimize the editor experience. Optimizely editors can upload a single image but specify different widths which is generated on the fly.
<img srcset="ImageExample.jpg?width=480 480w,
ImageExample.jpg?width=800 800w"
sizes="auto"
src="ImageFallBack.jpg">