Responsive image style with srcset and without sizes Using this tutorial for example I found out how to use responsive image styles in Drupal 8 without &lt;picture&gt; (which is pretty straight forward anyway).

However this approach forces you to use sizes. The article says


  The default here 100vw is hard-coded for a good reason, it's a pretty sane default and works well in most situations.


which I completely disagree with. I find that in most cases you simply want to provide higher resolution images of simple &lt;img&gt;s for devices with a dppx that is greater than 1.

So how do I achieve something as simple like

&lt;img src="foo_320.png" srcset="foo_640.png 2x"&gt;


with responsive image styles in Drupal?
Define your own breakpoints group with "multipliers" settings in YOURTHEME.breakspoints.yml  (see D8 Docs)
Go to Admin > Configuration > Media > Responsive Image Styles and add a new image style.
When creating the responsive image style, select your breakpoint group created in (1.). When your YAML is correct, you should see a separate detail set for every multiplier (=dppx).
Select type " Select a single image style." and select your corresponding image size. Repeat for every DPI group defined in your breakpoints.yml
In your node's display settings, for your image field, select the responsive image formatter and choose your responsive image style created in (2.)