Picture orientation #1058

Closed
opened 2026-02-20 00:05:15 -05:00 by deekerman · 8 comments
Owner

Originally created by @lakemike on GitHub (Aug 14, 2021).

Originally assigned to: @lastzero on GitHub.

Hello Team PhotoPrism,
I have 2 jpegs from 2009, where picture orientation is provided via Exif tag. In pretty much all picture viewers, it's used correctly, however for some reason PhotoPrism does not seem to use it. Shall I send these pictures to hello@photoprism.app?

Originally created by @lakemike on GitHub (Aug 14, 2021). Originally assigned to: @lastzero on GitHub. Hello Team PhotoPrism, I have 2 jpegs from 2009, where picture orientation is provided via Exif tag. In pretty much all picture viewers, it's used correctly, however for some reason PhotoPrism does not seem to use it. Shall I send these pictures to hello@photoprism.app?
deekerman 2026-02-20 00:05:15 -05:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@graciousgrey commented on GitHub (Aug 16, 2021):

Hi, yes just send them to hello@photoprism.app. We will have a look as soon as possible!

@graciousgrey commented on GitHub (Aug 16, 2021): Hi, yes just send them to hello@photoprism.app. We will have a look as soon as possible!
Author
Owner

@graciousgrey commented on GitHub (Aug 17, 2021):

This happens because both of these files have

"Orientation": "Unknown (0)"

in their exif metadata.

What you can do is:

  • Change the exif data of the files with the wrong orientation, in this case using: exiftool -Orientation="Horizontal (normal)" filename1.jpg filename2.jpg
  • Reindex
@graciousgrey commented on GitHub (Aug 17, 2021): This happens because both of these files have `"Orientation": "Unknown (0)"` in their exif metadata. What you can do is: - Change the exif data of the files with the wrong orientation, in this case using: `exiftool -Orientation="Horizontal (normal)" filename1.jpg filename2.jpg` - Reindex
Author
Owner

@lakemike commented on GitHub (Aug 17, 2021):

I had hoped that Photoprism could pick this up, either a) bring the default orientation in line with what other picture viewers do (I have no problem with these two pictures anywhere else) or b) flag this for review.

On my end, since I don't know which pictures have this issue, I could scan the library with exiftool. Not impossible but somewhat redundant since Photoprism is scanning as well.

@lakemike commented on GitHub (Aug 17, 2021): I had hoped that Photoprism could pick this up, either a) bring the default orientation in line with what other picture viewers do (I have no problem with these two pictures anywhere else) or b) flag this for review. On my end, since I don't know which pictures have this issue, I could scan the library with exiftool. Not impossible but somewhat redundant since Photoprism is scanning as well.
Author
Owner

@lastzero commented on GitHub (Aug 17, 2021):

PhotoPrism picked this up as expected looking at metadata:

$ exiftool -a -g 20091025-1745-img_2937y.jpg
Orientation                     : Unknown (0)
Auto Rotate                     : Rotate 90 CW
Rotation                        : 90

$ exiftool -a -g 20091025-1732-img_2930y.jpg
Orientation                     : Unknown (0)
Auto Rotate                     : Rotate 90 CW
Rotation                        : 90

The orientation may be unknown, but the rotation is 90 degrees CW. The reason some viewers show it "correctly" is because they support less metadata.

@lastzero commented on GitHub (Aug 17, 2021): PhotoPrism picked this up as expected looking at metadata: ``` $ exiftool -a -g 20091025-1745-img_2937y.jpg Orientation : Unknown (0) Auto Rotate : Rotate 90 CW Rotation : 90 $ exiftool -a -g 20091025-1732-img_2930y.jpg Orientation : Unknown (0) Auto Rotate : Rotate 90 CW Rotation : 90 ``` The **orientation may be unknown**, but the **rotation is 90 degrees CW**. The reason some viewers show it "correctly" is because they support less metadata.
Author
Owner

@lastzero commented on GitHub (Aug 17, 2021):

Ignoring this may lead to images shown with the wrong orientation for other users, so I'll close this for now. Should be possible to write a script that goes through affected images and fixes this.

@lastzero commented on GitHub (Aug 17, 2021): Ignoring this may lead to images shown with the wrong orientation for other users, so I'll close this for now. Should be possible to write a script that goes through affected images and fixes this.
Author
Owner

@lastzero commented on GitHub (Aug 17, 2021):

Note we may add settings to customize the behavior in a later release. That could be a feature request, just don't see it as a bug that needs to be fixed immediately since the metadata contains a rotation. Reading related forum posts, there's different opinions on whether to ignore fields other than Orientation for JPEG images to match results with tools who only support this. The interpretation may also vary depending on the file type. AFAIK videos only have a Rotation and no Orientation. You're welcome to do more research on this.

@lastzero commented on GitHub (Aug 17, 2021): Note we may add settings to customize the behavior in a later release. That could be a feature request, just don't see it as a bug that needs to be fixed immediately since the metadata contains a rotation. Reading related forum posts, there's different opinions on whether to ignore fields other than `Orientation` for JPEG images to match results with tools who only support this. The interpretation may also vary depending on the file type. AFAIK videos only have a `Rotation` and no `Orientation`. You're welcome to do more research on this.
Author
Owner

@lakemike commented on GitHub (Aug 17, 2021):

I see two things

  • pushing those pictures into review category (seems smart given the ambiguity around handling of these EXIF tags)
  • enabling the user to carry out +90/-90 degree rotations on any picture (and writing changes back to file)
    but totally see that it's not mission critical..
    Thank you!!
@lakemike commented on GitHub (Aug 17, 2021): I see two things - pushing those pictures into review category (seems smart given the ambiguity around handling of these EXIF tags) - enabling the user to carry out +90/-90 degree rotations on any picture (and writing changes back to file) but totally see that it's not mission critical.. Thank you!!
Author
Owner

@lastzero commented on GitHub (Aug 17, 2021):

There is an issue for changing the rotation (and a few other things): #464

@lastzero commented on GitHub (Aug 17, 2021): There is an issue for changing the rotation (and a few other things): #464
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1058
No description provided.