Images Turn Upside Down When Uploaded to SharePoint 2013

My colleague Sharee English works with SharePoint a lot and always finds some interesting and bizarre behaviors in SharePoint. The other day she asked me to look into a behavior related to images in SharePoint Server 2013 that was incredibly bizarre. I did find a solution for her but haven't spent enough time to find the cause of the problem yet. Problem A client sent us three pictures that we wanted to upload to a site that Sharee was working on for the client. The pictures looked fine when opened in Picture Viewer or Paint. However, as soon as the pictures were uploaded to the SharePoint 2013 site, they turned upside down. So she opened one of the pictures in Paint and turned it right side up, saved the image and uploaded it to SharePoint again. The image still loaded in SharePoint site as upside down. Then she turned the image sideways and every which way but no matter what she did the image still showed up as upside down, similar to the screenshot below. These are not the exact pictures from the client sent but for demo purposes I will use some of the pictures that I took. Solution/Workaround I asked Sharee to send me the pictures. I uploaded them on my computer and the behavior was exactly the same that she had experienced. I tried various techniques and finally came up with a solution. Perhaps I shouldn't call it a solution because it was more of a workaround than solution. Here's the only thing I was able to do to get them to upload and display properly (i.e. right side up).
  1. First I uploaded a picture from my computer to the SharePoint site. It uploaded fine.
  2. Then I uploaded an image sent by client to the SharePoint and noticed it was upside down (see image above), even though it was right side up when I opened the same saved image from my computer.
  3. I uploaded the second and third picture and they behaved the same way. They were right side up when opened from the computer but as soon as they were uploaded to SharePoint they turned upside down.
  4. I then saved the first upside down picture in SharePoint to my desktop. I figured I will work with one image at a time and see what happens.
  5. I deleted the first image from SharePoint after I saved it to my desktop.
  6. I opened the newly saved picture on my desktop and opened it in Windows Picture Viewer. It was upside down just the way it looked in SharePoint. Keep in mind that the picture originally was fine and was right side up when the client sent it to us. It only got flipped upside down when it was uploaded to SharePoint.
  7. I flipped the picture upside down so it looked the way it was supposed to look (i.e. right side up). By the way, opening it in Microsoft Paint and flipping it upside down also yielded the same results.
  8. I then uploaded this picture to the SharePoint site again and it fortunately was right side up. Whew!
  9. I repeated these steps for the other two pictures and it worked. They were finally uploaded to the SharePoint and displayed right side up as shown below.
I still have the original images from client and am able to duplicate the problem on different computers but haven't invested time to find the root cause of the problem, which seems to be tied to the images we received. If I found the exact reason for this behavior I will update this article. Have you experienced this behavior in SharePoint? If yes, I would love to hear from you.
Copyright ©2014 Zubair Alexander. All rights reserved.