Skip to content
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 v10 images dosen't seem to work #28

Closed
christophebeling opened this issue Jan 12, 2021 · 7 comments · Fixed by #51
Closed

next.js v10 images dosen't seem to work #28

christophebeling opened this issue Jan 12, 2021 · 7 comments · Fixed by #51
Assignees
Labels
feature/next.js Missing feature from Next.js
Milestone

Comments

@christophebeling
Copy link
Contributor

Request URL: https://my.domain/_next/image?url=%2FImages%2FInvest_1.jpg&w=2048&q=75
Request Method: GET
Status Code: 404 
Remote Address: 143.204.215.108:443
Referrer Policy: strict-origin-when-cross-origin
age: 5842
cache-control: public,max-age=0,must-revalidate,s-maxage=31536000
content-encoding: gzip
content-type: text/html
date: Tue, 12 Jan 2021 10:05:59 GMT
etag: W/"a6a3ead7fe34e552f0cf9d3344ae209d"
last-modified: Sun, 03 Jan 2021 19:33:17 GMT
server: AmazonS3
vary: Accept-Encoding
via: 1.1 a4a46c5a6cdf81ec1d08cf6e63389765.cloudfront.net (CloudFront)
x-amz-cf-id: tP9pWfQhy--Y6LPpZVsTIvLtWMx9hw6rTAwMxCAYMreefFbvXKcylQ==
x-amz-cf-pop: FRA53-C1
x-cache: Error from cloudfront

Is this a known issue or did I do something wrong with my configuration?

@ofhouse
Copy link
Member

ofhouse commented Jan 12, 2021

Hi Christoph,
I've run a quick test with next/image and it is currently not supported, since in serverless mode this feature is provided by the Vercel edge CDN and is not a core feature from Next.js.

As a workaround you could use an external cloud provider for image optimization: https://nextjs.org/docs/basic-features/image-optimization#loader

However we plan to support this feature soon by releasing another Terraform module that can be used as external loader for existing Next.js setups or together with this module.

@ofhouse ofhouse added the feature/next.js Missing feature from Next.js label Jan 12, 2021
@ofhouse
Copy link
Member

ofhouse commented Jan 12, 2021

Okay, I made a little POC and it seems that is is doable with little effort: https://github.com/dealmore/terraform-aws-next-js-image-optimization

However with testing etc. I expect that this takes about two weeks before we can land it here.
Will update the issue when I have more to share.

@christophebeling
Copy link
Contributor Author

That looks great - thanks a lot. If there's anything I can support you with let me know.

@ofhouse ofhouse self-assigned this Jan 26, 2021
@christophebeling
Copy link
Contributor Author

Hi, is there any update on this?

@ofhouse
Copy link
Member

ofhouse commented Feb 3, 2021

Unfortunately I didn't have as much time as I had hoped initially 🙈
Anyway we are pretty close to the release of the standalone module, which is tracked here: milliHQ/terraform-aws-next-js-image-optimization#1.

Currently I target early next week for a release of the standalone version and we plan to publish a 0.7.0 version of this module which includes image support in the same week.

@ofhouse
Copy link
Member

ofhouse commented Feb 7, 2021

We have now released v1.0.0 of the standalone module here: https://registry.terraform.io/modules/dealmore/next-js-image-optimization/aws

We will continue integrating the standalone module into this module in the next week.

@ofhouse ofhouse mentioned this issue Feb 8, 2021
4 tasks
@ofhouse ofhouse added this to the v0.7.0 milestone Feb 12, 2021
@ofhouse
Copy link
Member

ofhouse commented Feb 13, 2021

Support for next/image component was added as part of the v0.7.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/next.js Missing feature from Next.js
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants