Why is Syncthing rotating my images?

Syncthing appears to be working, but it’s taking all my pictures where the height is greater than the width and rotating them 90 degrees (2988x5312 becomes 5312x2988). What’s more, it seems to arbitrarily choose the rotation between clockwise and counterclockwise per picture.

I installed syncthing-windows-386-v0.14.10. Using Galaxy S6

Syncthing does not do any special treatment to any of the files you have, all files are the same to syncthing, so it’s something else causing this.


The file size is different, too. I am comparing the images between what was synced before using the Windows 7 Import Pictures and Videos feature and what I just synced with Syncthing. Between the rotation and file size differences, there’s definitely something going on. I will wait and see if anyone else reports this issue.

If it’s Win7 you’re using, if I’m not mistaken its built in photo viewer ignores rotation information. Try looking at the pictures with another program. In other words: the pictures are the same, their presentation is different.

This is not Syncthing’s doing. Syncthing hashes the files to ensure they are byte for byte exactly identical before and after sync.

I suspect it is the other way around. The “Windows 7 Import Pictures and Videos feature” messes with your files, while Syncthing does not.

If you copy the files directly with a file manager from your Android to your PC, they will be the same as with Syncthing.

Already saw that recently. Recent pictures from a friend’s iFone. I turned them the right side in linux, but I remember the sync’d XP32 embeded viewer didn’t shew them OK. Once rotated again from win they remain OK back on nux… surely some something to do with exif data. I didn’t even thought ST could be faulty here. Maybe XP, maybe the moon :wink: O and something else: the phone doesn’t touch the original pictures. I discovered there is a special extension file in the phone with same name as the jpg one, which is just an xml file that describes the changes you made to the picture. The phone’s viewer reads this file, that why you see two or more same pictures (rotated, cropped etc…). Junk soft: if you have a fucking iFone, just buy a fucking iMak

I’ll just post general reply since several of you hit the nail on the head with this.

It turns out that everyone is correct. Syncthing isn’t altering my images at all and is, in fact, syncing exact copies. I haven’t finished researching, but I am now convinced that Windows’ native import tool is jerking with my files.

  • File sizes between my phone and Syncthing folder are identical, but are significantly smaller in the folder used by Windows’ tool. This is most likley due to having to re-encode the image in order to rotate it and choosing an arbitrary quality level in the process.
  • When I view the images from my phone’s DCIM folder in Windows Explorer and even from my phone itself, they’re at proper orientation. Only when I copy them locally do they appear rotated. This is most likely due to some metadata file stored on my phone that both my phone and Explorer are using to visually rotate the images.
  • Videos are not affected.

So I am glad I came here with this because it’s apparent that using Windows’ native sync utility is a terrible way to sync your files, especially if you appreciate higher-quality images.

So now I need to find out these things:

  • What is Windows’ utility doing to my files? I have “Rotate pictures on import” checked. Doh!
  • Why does my phone save pictures in an orientation that differs from how I was actually holding my phone?
  • Does lossless image rotation exist?

So thanks all. I’ll be back with more info later.

1 Like