circulate
circulate copied to clipboard
Librarian view: Item image rotation issue
Describe the bug
On the Librarian view: The image for this item on the live site appears correctly on the edit photo page, but not on the item page or item index (e.g., https://app.chicagotoollibrary.org/items/13), where it's rotated 90 degrees. See screenshots below.
We're storing a rotation value in the database, but the output to the user is wrong. I'm assuming that something is happening with Imagekit- perhaps it is detecting some metadata in the original image and auto-rotating it?
Librarian view
(User-facing) Item page view
Could you post a link to the image directly so it can be downloaded? I have a feeling it would be fixed by adding this CSS, but I can't test it
img {
image-orientation: from-image;
}
Here's the file as we serve it: https://ik.imagekit.io/sac4wk7wt3/d2tx8o0qr4z10i1idpj3vmpn4gnm?tr=w-600,h-600,c-at_max,rt-270
And here's the actual image:
We have some code that's supposed to store a user-provided rotation and apply it- that's where the rt-270
comes from. I don't know if the issue is that the rotation in the editing UI is broken, or if the way we display the file through ImageKit is the issue.
Using that link above and changing the rt-270 to rt-0 fixes it in the browser by itself. Can't check the prod values that are shored for the url in prod. but it looks like the rotation value is attached to it.