Have a look at this response if you’re able to install plugins:
TL/DR
Two plugins allow you to write images via Markdown e.g.  and generate srcset markup and all the resized images. No YAML, no Liquid loops, no includes, etc.