0

When I upload image with my phone to my website, it save and display it in landscape mode(bigger width), even if I take the picture in portrait mode(bigger height). But when I upload it from my PC all works well. Have you heard of this problem, and any solutions to solve it?

PS.I don't think I need to add the code, because its just a simple adding image to the folder.

This is how I save the image in the folder:

move_uploaded_file($name,"../../main/".$user."/Post/".$path);
  • what are you using to upload the image? when using a library it is possible that it is modifying it for upload, sometimes changing the file format changes the orientation of the image. Check this answer: https://stackoverflow.com/questions/22308921/fix-ios-picture-orientation-after-upload-php So you need to be more specific with the uploading process. – Leo Mar 24 '16 at 19:24
  • 1
    Possible duplicate of [PHP read\_exif\_data and Adjust Orientation](http://stackoverflow.com/questions/7489742/php-read-exif-data-and-adjust-orientation) – cmorrissey Mar 24 '16 at 19:25

0 Answers0