I have a script that uploads the images and creates 2 files: width 1200 and width 50.
It works normally, but when the photo is vertical (height greater than width) it rotates the image in the upload alone.
I noticed that even uploading directly through the cpanel, when it opens the image it is rotated.
If I open the image in photohop and save as a new one, that works normal