Closed jaga810 closed 1 year ago
Hi @jaga810, Thank you for providing repro steps. We are investigating this. Will update once I have more information.
Update: We were able to reproduce this behavior and identify this as a bug. We are working on fixing this. Thanks!
Until the bug is fixed, did anyone find a workaround for this bug?
Hi @alrabdullah, unfortunately there isn't a workaround for this but we are prioritizing this issue.
This happens too with NextJS i18n https://nextjs.org/docs/advanced-features/i18n-routing
I have the default locale configured in en
and my browser is configured in es
. It should redirect to es automatically. It works on Vercel but not in AWS
For what it's worth, when accessing the NextJS app using the Cloudfront URL, we do get webp images back.
That's makes me think that somewhere between Amplify requesting images from Cloudfront that the accept/webp
header isn't being transferred so when Cloudfront gets the request for the image it just returns the default format of that image.
This also got me thinking, what is the difference between the Amplify URL and the Cloudfront URL for a NextJS app?
I'm seeing the same behaviour as @shaunchander. Any idea when this might be fixed?
Hi @jaga810, Thank you for providing repro steps. We are investigating this. Will update once I have more information.
Update: We were able to reproduce this behavior and identify this as a bug. We are working on fixing this. Thanks!
I am having the same issue.... Are this bug still not fixed?
As a workaround we can use platforms like cloudinary and use their sdks to make image responsive, lazy load, decrease size.
There seems to be something happening with png and transparent backgrounds. I don't know if that is related but when using the Image component, the transparent background becomes black. I noticed this happens only on external urls only.
Internal url image (works fine) External image url (transparent is transformed to black) If you play around with the background-color property on both images, you'll see that the external one's background doesn't change. However, everything works fine when using next dev.
For the record, I am using nextJS 11 and nodeJS 16
yeah, webp is not working for me too, it works in local, but in production, the image is still jpeg or png, I'm using nextJS 12
@xiaoxiaosaohuo Hi, just a side question, can you use Nextjs 12 SSR in amplify. As far as I know, version 12 is not supported officially yet.
I use the latest version, I think you're right, Amplify support version 11
@hloriana. What is the status of this issue?.. Automatic WebP conversion is a very nice feature of NextJs... is a shame is not working with amplify
You know approximately when will Amplify suppot Nextjs 12 Image webp optimization?
I have the same issue. Appreciate it if support for this could be added, due to SEO. I only get a 93 in performance, I'd like to see Amplify as the fastest host out there giving me a 100 on Google Lighthouse :)
so this bug has been open by 10 month now. is there any update or eta? what's the point on using amplify if it does not work?
I am pleased to share we have now launched support for Next.js 12 and 13 image optimization. For more information, please see our blog post at https://aws.amazon.com/blogs/mobile/amplify-next-js-13
If you run into issues with Next.js 12 or 13, please open a new issue so we can track it specifically. Thank you everyone for your patience and support. It's much appreciated.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Before opening, please confirm:
App Id
https://main.d3pdm8wpju4m0p.amplifyapp.com/
Region
us-west-2
Amplify Console feature
Not applicable
Describe the bug
WebP conversion provided by Next.js image optimization feature [1] seems not working on Amplify Console. Similar issue is also created in amplify-js repository [2].
[1] https://nextjs.org/docs/basic-features/image-optimization [2] https://github.com/aws-amplify/amplify-hosting/issues/2906
Expected behavior
WebP conversion provided by Next.js image optimization feature [1] works.
Reproduction steps
npx create-next-app --example image-component image-app
cd image-app
npm run dev
Check images are served as WebP type using developer tool as below.
Push image-app directory to your repository.
Deploy image-app using Amplify Console with default settings.
Check images are served as PNG type using developer tool as below.
Build Settings
Additional information
No response