This is because the image EXIF info created when taking the photo. Your local system may recognize the EXIF info and randing it correctly, while most of the web browsers will not.
EXIF info is also a good source of leaking personal information. So it is better to remove the EXIF info before uploading the image to the internet.
There are a lot of instructions online regarding how to remove EXIF information.