I have an issue with Magento 2.4.4 upload Photo. as you can see after uploading a picture there is a rotation of the image. I did a quick search and found that this problem comes when a photo is uploaded with iPhone and EXIF data. I already tried following the code in uploader.php. but, did not work. please check the code and SS. does anyone got the same issue?
if ((strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) && exif_imagetype($this->_file['tmp_name']) == IMAGETYPE_JPEG) {
$source = imagecreatefromjpeg($this->_file['tmp_name']);
$rotate = imagerotate($source, 270, 0);
imagejpeg($rotate, $this->_file['tmp_name']);
}