Here is a dump of image information that is inside your jpg:
{ 'width' => 2592, 'DateTime' => '2016:09:12 14:43:08', 'file_media_type' => 'image/jpeg', 'Tag-0x9208' => 0, 'file_ext' => 'jpg', 'Tag-0x9003' => '2016:09:12 14:43:08', 'color_type' => 'YCbCr', 'Model' => 'Lenovo P1a42', 'Tag-0x9286' => 'i. 100%', ..... 'BitsPerSample' => [ 8, 8, 8 ], 'SamplesPerPixel' => 3, 'Tag-0x9207' => 65535, 'height' => 1944, 'Orientation' => 'right_top', 'Software' => 'Retrica', 'Make' => 'Lenovo', 'resolution' => '1/1', 'JPEG_Type' => 'Baseline' };
As you can see in each image contains a lot of additional information. Especially pay attention to the field 'Orientation' => 'right_top' . This field means that the camera was rotated 90 degrees when shooting. Image viewers usually take this fact into account and rotate the photo on the screen so as to compensate for the rotation of the device at the time of shooting. But programs that create smaller images for avatars often do not take this into account, and after the conversion, orientation tags also do not tolerate. The correct image conversion program should look at the orientation tags and rotate the image before making a smaller copy.