-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format webp rotate image but not for png or jpg #381
Comments
I moved this to the right repo for you. See #375 Browsers do not respect these values for WEBP so there’s nothing we can do. |
Thanks :) Anyway update to image to workaround this? Because most other images in portrait format is rotated correct.
However I don't see the `Orientation EXIF meta data on this image. |
See #375 (comment) |
Okay, was more looking for a manual solution to adjust image. I could remove the We could probably just edit the image and save it as a new image. Or I could ask ChatGPT to remove it. |
I don’t think you understand what I’m saying. Or maybe I don’t understand what you are asking for. Your image has metadata that says it should be displayed rotated by 90 degrees. The browser is ignoring those instructions because it doesn’t support parsing EXIF rotation for WEBP. You cannot do anything to make the browser respect those instructions while keeping the format as WEBP. Removing the instructions will leave your image displayed with the wrong orientation as you currently have. The only valid workaround would be to create a clone of the image swapping the height and width and remapping the pixel data to the new image saving it again as WEBP with the EXIF instruction removed which is exactly what I suggested with the processor. By using a processor you future proof yourself against future instances. There’s no magic solution to this. |
I do understand the issue and the limitation in the browser. We could handle this as you suggest via code, but since it works correct for this image #381 (comment) without EXIF orientation, I am just suggesting it could be handle manual for these few images. I rarely see this issue in Umbraco projects, and it seems mainly to be an issue when images uploaded where taken from mobile device camera. So it is something the content editors could handle themselves. The simplest solution it probably just to edit the image in an image editing tool, e.g. Photoshop, save the image as a new image, and upload this instead. or when EXIF |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.1.6
Other ImageSharp packages and versions
ImageSharp.Web 3.1.3
Environment (Operating system, version and so on)
Windows 10
.NET Framework version
8.0.113
Description
We noticed in Umbraco 13.7.0 an image uploaded shown correct at thumbnail e.g.
?rmode=max&width=500
Viewing the EXIF meta data via e.g. https://jimpl.com/ I see the following:
Orientation: Rotate 90 CW
Not sure why the rotation is different depending on
format
though.The image seems also to be rotated correct using these querystrings:
but using WebP the image is rotated:
Steps to Reproduce
Use the example image below and test with
?format=webp
in querystring.Images
I have attached the original image used in the example: test.zip
The text was updated successfully, but these errors were encountered: