Closed ustuncem closed 1 year ago
Hey there, we do not recommend ejecting from the default Node.js server through next start
, which is where the deployment documentation is mentioning that Image Optimization works out of the box.
Is there any other way to deploy to IIS? This seems to be the only solution right now.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What is the improvement or update you wish to see?
Image Optimization API
Is there any context that might help us understand?
Hello Vercel Team,
Here is the problem that I have with the Image API. If things are on Vercel or a server that supports Node.js, everything runs perfectly fine. But sometimes clients insists on keeping things on a server for example: IIS. Now since IIS doesn't directly supports Node.js there is library that I think all Next.js developers use when they deploy their app to IIS: iisnode. When I use this library some images aren't loaded and they throw this error to console:
I researched this a bit and I think by design, Image Optimization API runs on the localhost:3000 but when I go to production, I can't constantly run localhost:3000 because obviously I'll have a domain name like example.com. I don't have any solution to fix this really other than disabling the image optimization. Maybe my server.js file is wrong?
I opened this issue for image optimaztion because everything else runs perfectly fine with this script but I think this should be clearly indicated on the "Deploying" part of the docs as well and also I still dont know if I can run the built in image optimization api in the production.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/optimizing/images