Blender image orientation

I am trying to composite a model into a photo in blender. The image is saved as a portrait but when opened in blender it appears landscape: https://gyazo.com/0c82aacd8900ff7bfc9dbb471b407334

If I reverse the resolution values of the camera and rotate the background image it becomes distorted:
https://gyazo.com/9aee058734c08fa56ed23b8fe91148c1
and in the movie clip editor it is also landscape which makes it confusing to work with.

I want the the background image to fit inside the frame of the camera while also being in a portrait orientation.
Thanks for the help.I am trying to composite a model into a photo in blender. The image is saved as a portrait but when opened in blender it appears landscape: https://gyazo.com/0c82aacd8900ff7bfc9dbb471b407334

If I reverse the resolution values of the camera and rotate the background image it becomes distorted:
https://gyazo.com/9aee058734c08fa56ed23b8fe91148c1
and in the movie clip editor it is also landscape which makes it confusing to work with.

I want the the background image to fit inside the frame of the camera while also being in a portrait orientation.
Thanks for the help.

Sometimes the thumbnail of an image is rotated so in preview mode with some imageviewers it seems to be okay but in reality it’s not. So maybe you just have to rotate your image (not in blender) ?