Vanilla srcset (no JS)

With 100vw sizes attribute

Make determination using viewport width when page is first loaded. Viewport width was px.

With fixed sizes attribute

Fixed at 400px. Should return same size regardless of viewport size.

With responsive sizes attribute

50vw if viewport is > 500px. 30vw if > 900px. 100vw otherwise.