How to keep an image aspect ratio when a user uploads an image?

I have a tool that will build a YouTube thumbnail. The user uploads their logo to the template.

However, when I go to view the Thumbnail the logo gets all distorted. Is there a way to make it so the width stays consistent and the height gets adjusted? Every check box I try doesn’t give me the results I am looking for.

If I put the height to 0 min then nothing shows up. The aspect ratio doesn’t seem to work properly because I don’t know their logo’s sizes.