I want to let users resize the image via a form I am building on a webpage. They can adjust either the width or height. When they do the other dimension should auto adjust to maintain the aspect ratio. When a user updates the width field, how can I get the adjusted height?