I have the following scenario - the main page banner should have at any time 1 of 3 images displayed at a given viewport size. These images are art-directed, that is to say, that will differ in content and layout and are created with desktop, tablet and mobile in mind. (All of this is despite my protests).
I'm wondering what are the options for requesting the correct image at the appropriate viewport size? (Optimisation is very much a concern here! I don't want to serve 3 images only to use 1.) My understanding when it comes to D8 and responsive images is that D8 will create versions of the same image for the srcset rather than giving the option to serve different images at different viewport sizes.
So what are my options here? Perhaps the best option is to have 3 image fields that are outputting directly into a srcset in a banner template.
hook_preprocess_responsive_image
to do something similar. But definitely with multiple image fields, one for each breakpoint.hook_preprocess_responsive_image
...