Make Image dynamically resize width to height

Hello, I’d like to achieve making an image canvas resize dynamically the width controlled by the height.
E.g.:
7672579--958462--upload_2021-11-20_2-2-38.png
when expanded, becomes:
7672579--958465--upload_2021-11-20_2-3-50.png
or when made smaller,
7672579--958468--upload_2021-11-20_2-5-1.png

Any help would be appreciated. (Again, I’m just looking for how to do this with the back image.)

7672579--958459--upload_2021-11-20_2-2-30.png

This is the magic sauce you need to look into:

Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

Also, for the future, the correct forum you’re looking for is the UI forum here, not the 2D forum.