I'm using angular with material and using img srcset to handle responsive image for header.
This is what I'm doing so far:
<img srcset="../../assets/mtn-bg_600.jpg 600w,
../../assets/mtn-bg_960.jpg 960w,
../../assets/mtn-bg_1280.jpg 1280w,
../../assets/mtn-bg_1600.jpg 1600w"
sizes="100vw"
src="../../assets/mtn-bg_1600.jpg" alt="Header image">
I'm confused about how to handle high resolution images with srcset. I have seen examples of srcset only having images with resolution like 1x 2x or with media queries. But want to be clear how can I handle images for high resolutions along with media queries.
Do I need to add high resolution images with their sizes as well in the srcset and img element will automatically handle it.
I'm using default breakpoints that flex-layout for material provides for my application as well as for srcset. Please also suggest if I would need to consider any other breakpoints for srcset.
Thanks!