This demo shows image-set() CSS can work with percentage css width and an unknown aspect ratio. Obviously this will not allow you to specify the height on the URL for dynamic images so your server side component should determine the aspect ratio or you should set the aspect ratio not to auto.
The primary content on the left side take 60% of the available width. The content on the right side containing the image takes 40% of the available width.
Adjusting the width of the browser will request various static images.