sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.7k stars 111 forks source link

Image optimizarion break on Nextjs 14.1 #384

Closed VanThanh12195 closed 3 months ago

VanThanh12195 commented 3 months ago

It seems like image optimization does not work on Opennext:

Image below is the screenshort for image optimization lambda function: image

khuezy commented 3 months ago

Hi, can you specify your next and open-next version? This might be a duplicate issue: https://github.com/sst/open-next/issues/374

conico974 commented 3 months ago

It is also not the correct way to access this function. You're accessing the lambda directly, you need to access it with an url like that : /_next/image?url=https%3A%2F%2Fopen-next.js.org%2Farchitecture.png&w=840&q=75

VanThanh12195 commented 3 months ago

Hi, can you specify your next and open-next version? This might be a duplicate issue: #374

I use Nextjs 14.1.3 and open-next 2.3.7

VanThanh12195 commented 3 months ago

It is also not the correct way to access this function. You're accessing the lambda directly, you need to access it with an url like that : /_next/image?url=https%3A%2F%2Fopen-next.js.org%2Farchitecture.png&w=840&q=75

I tried this: and got this error : "Cannot read properties of undefined (reading '0')"

conico974 commented 3 months ago

It looks like the open-next plugin is not applied @VanThanh12195 Are you building on windows ? You should use WSL there

VanThanh12195 commented 3 months ago

It looks like the open-next plugin is not applied @VanThanh12195 Are you building on windows ? You should use WSL there

yes I am using win 11

conico974 commented 3 months ago

I'll close all the windows related issue in favor of https://github.com/sst/open-next/issues/385