-
Notifications
You must be signed in to change notification settings - Fork 116
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
Next.js Images Rotating #3801
Comments
Hi @miau23 , we are looking into this. Will update this thread shortly. |
@miau23 , could you please provide the branch name where you see this issue and also, if you have some specific URL paths for the images where this is happening. Or request ids (Look for |
We saw the issue on our branch named development and did the deploy of the same build and also observed the issue on the staging branch. Here is an example of one of the images we find not flipped in local but flipped 180 degrees in amplify - 180 degree img example |
ok, thanks for the information. Are these images in EXIF format by any chance? |
Thanks for bringing it to our attention @miau23. The issue has been mitigated. Source images that had a rotation specified in their metadata (EXIF, XMP, IPTC) were affected due to their orientation metadata being lost in the optimization process. Feel free to re-open the ticket if you have any further questions, and apologies for the inconvenience caused. |
|
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d2cpp5fdm4eyuq
AWS Region
us-east-1
Amplify Hosting feature
Deployments
Frontend framework
React
Next.js version
13.5.4
Next.js router
App Router
Describe the bug
Next.js Images display with the correct orientation locally but when deployed to amplify are rotated 90 or 180 degrees for images that are wider or taller than the width/height given for the Image. They appeared correctly last week so it seems to be a newly introduced bug (last week/over this weekend). We also tried redeploying old builds to verify it wasn't an issue with any recent code changes and the images appeared rotated in all builds. To double check, we looked at a hosting environment we last deployed November 1st and saw the images all correctly oriented and then redeployed the exact same build and found the images were rotated. We have not changed anything in the build settings/env in 3 weeks. Due to all these factors we believe the issue is a result of a recent change to amplify causing next.js v13, node v18, and amplify to no longer support correct orientation for Next.js Images. If I go through and manually crop the image to be a square rather than a rectangular they no longer appear rotated.
Expected behavior
We expect Next.js Images to maintain their orientation between our local environment and deployment in an aws amplify environment. We expect Next.js images to maintain the behavior we saw prior to this week in which rectangular images were not rotated on deployment .
Reproduction steps
Here is an example skeleton code snippet for building the image list using typescript and MUI
Build Settings
Additional information
Example of comparison between local and deployed website
local
amplify
local
amplify
The text was updated successfully, but these errors were encountered: