I took some photos, all using the same camera. I did some rotations on the photos using Windows 10 built in photo app. I then uploaded those files to my server. Some of the photos kept their rotation info, but other photos lost it. I rotated it again and re-uploaded, but its still the same. Could you teach me why this is happening please? Is there any way to add rotation info by hand fixing jpg file code?
Asked
Active
Viewed 127 times
0
-
1your photos probably have problems with the EXIF data of the image (part of this data is the image orientation). This can be fixed by modifying the camera app code, or you can check the image orientation data from your backend before uploading the image. – Max Svidlo May 19 '19 at 06:44
-
Dear @Max Svid Thank you for answering me. I see ... I will check the data. – machagr May 21 '19 at 00:38
1 Answers
1
You can turn and save the pictures according to the EXIF data on a server with auto-orient:
convert upload.jpg -auto-orient turned.jpg
Here I found two other solutions for you:
With jQuery: jQuery image preview exif rotation issue
Exif orient script: https://www.npmjs.com/package/exif-orient

Joël A
- 196
- 1
- 2
- 13
-
Dear @Joël A Thank you for answering me. Could you give me a little time? I will try it out. – machagr May 21 '19 at 00:38