I have an app where a user takes can take a photo and store the image in an AWS S3 bucket. My app will then save the URL for the image so that the user can view the image at a later time. If I go to my S3 bucket and look at an image it appears in the correct orientation. However when I use the URL for the image in my React app the image appears rotated 90 degrees.
When the image is taken a file name is immediately declared and the URL for the image is immediately saved to the database. Since the images don't appear rotated when I go directly to the S3 bucket or the URL I am assuming the issue has to be something with the way I am trying to access the S3 bucket.
When my app tries to access the S3 bucket this is the only code that is used:
<CardMedia
className={classes.img}
image={this.props.url}
/>
Where this.props.url is the URL which was stored when the image was taken.
I really can't figure out why the image is being rotated as there is very little code being used here.