The file you posted has EXIF data which looks like this (note that it includes GPS data too):
The 4th line says that in some viewers the image should be rotated so that the -- all it is telling you is that the phone was rotated when the picture was taken.... It then rotates it back ion some viewers (but not generally in web browsers) -- this is just an illusion!
Don't know what operating system you are working on but Irfanview is an example of simple software that you can use to process the data.
The ones that are rotated will be the ones where they rotated the phone and where the phone sets the orientation tag.
Since you are using gimp see
https://butterflyofdream.wordpress.com/2012/10/17/how-to-turn-off-auto-rotation-of-photo-image-in-gimp-2-8/
You can set GIMP to respect the tag or not (or to ask you)
Make - Apple
Model - iPhone 6s
Orientation - Right top
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
Software - 11.3.1
DateTime - 2018:05:11 15:05:00
YCbCrPositioning - Centered
ExifOffset - 206
ExposureTime - 1/30 seconds
FNumber - 2.20
ExposureProgram - Normal program
ISOSpeedRatings - 100
ExifVersion - 0221
DateTimeOriginal - 2018:05:11 15:05:00
DateTimeDigitized - 2018:05:11 15:05:00
ComponentsConfiguration - YCbCr
ShutterSpeedValue - 1/30 seconds
ApertureValue - F 2.20
BrightnessValue - 3.03
ExposureBiasValue - 0
MeteringMode - Multi-segment
Flash - Flash not fired, auto mode
FocalLength - 4.15 mm
SubsecTimeOriginal - 017
SubsecTimeDigitized - 017
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 4032
ExifImageHeight - 3024
SensingMethod - One-chip color area sensor
SceneType - Other
ExposureMode - Auto
White Balance - Auto
FocalLengthIn35mmFilm - 29 mm
SceneCaptureType - Standard
Lens Info - 4.15 4.15 2.20 2.20
Lens Make - Apple
Lens Model - iPhone 6s back camera 4.15mm f/2.2
GPS information: -
GPSLatitudeRef - N
GPSLatitude - 41 9 54.28 (41.165078)
GPSLongitudeRef - W
GPSLongitude - 95 55 28.23 (95.924508)
GPSAltitudeRef - Sea level
GPSAltitude - 312.78 m
GPSTimeStamp - 20 4 59
GPSImgDirectionRef - True direction
GPSImgDirection - 345.765823
GPSDateStamp - 2018:05:11