My goal is to serve different versions (resolutions/sizes) of the same image, which should occupy 100% of the width of the viewport, so I can serve a 800px version to mobile devices (or, generally, devices with smaller displays or slower connections), 1366px and above to larger desktop displays.
The problem is that I'm testing it with the Chromium device emulator and some small screen devices load the 1366px version instead of the 800px: the iPhone 6/7/8 (375px width) loads the 800px image, but the iPad (768px), Nexus 5 (360px) and iPhoneX (375px) all load the 1366px instead of loading the 800px.
I'm not very confident of having understood the sizes directive properly, here's my code, the default src references the 2880px version just to help testing:
<img class="img-fluid"
srcset="img/dreamstime_800w_109635242.jpg 800w,
img/dreamstime_1366w_109635242.jpg 1366w,
img/dreamstime_2880w_109635242.jpg 2880w"
sizes="(max-width: 800px) 100vw,
(max-width: 1366px) 100vw,
2880px 100vw"
src="img/dreamstime_2880w_109635242.jpg"/>