Making image size responsive

Hi,

I’m struggling to get an image to display in a way that I’d expect. We allow a client to upload an image as part of a banner on their thank you and order status page.

It might look something like this:

I’d like to be able to dynamically size the image according to the size of the screen - showing the same image, but scaled down, if the device is a small one.

While it does scale a little automatically, it doesn’t allow really shrinking it down.

I’m struggling to find the right incantations to make Shopify’s UI extensions change the image size.

Can anyone point me in the right direction?

The relevant code to display the experience is here.

Thanks,
Ed