Hey folks - with nextjs site and local images - is...
# help
t
Hey folks - with nextjs site and local images - is that supported out of the box with the nextjs construct? This is how I am using it - https://nextjs.org/docs/basic-features/image-optimization#local-images My images used with the local path are not loading in the cloudfront url
f
Hey @Tharshan, I haven’t tried using local images. Did you get a chance to try it out?
m
@Tharshan you need to add the cloudfront domain in the
next.config.js
file 👉 https://nextjs.org/docs/basic-features/image-optimization#domains
t
@Frank I did give it a try - the local images when deployed does not seem to load. Will give that a try @manitej - thanks!
m
Let me know if that worked @Tharshan
t
Nope - that did not work either
When I visit the URL of the image - I see the following
Copy code
"url" parameter is valid but upstream response is invalid
This was happening before too
The SST construct says the following: https://docs.serverless-stack.com/constructs/NextjsSite
Image Optimization: Images are resized and optimized at CloudFront edge locations using Lambda@Edge.
Is that just for remote images?
m
Can you share me the image URL in DM?
t
Yep will do!