Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

NextJS 10.0.0 <Image /> component causes 404 #725

Closed
@Ali762

Description

@Ali762

Describe the bug

I realise NextJS 10 is only a couple of days old, but thought I'd just mention this to make sure it's captured.
Using the new NextJS Component doesn't work.

Actual behavior

Using the Image component results in a 404 error from the server. It works in dev, but deploying to AWS doesn't.

Expected behavior

The image should return correctly.

Steps to reproduce

Screenshots/Code/Logs

Request URL: https://mywebsite.com/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F9h...etc etc
Request Method: GET
Status Code: 404

Response Headers:
cache-control: public, max-age=0, s-maxage=2678400, must-revalidate
content-encoding: gzip
content-type: text/html
date: Fri, 30 Oct 2020 01:42:59 GMT
etag: W/"6805d78c611deceec9b5bd040ab84078"
last-modified: Fri, 30 Oct 2020 01:37:01 GMT
server: AmazonS3
status: 404
vary: Accept-Encoding
via: 1.1 2b782f5f082f9e98adf8c50f24b6bb6d.cloudfront.net (CloudFront)
x-amz-cf-id: XDhH5J8y7n052fhPQ6T9Rvh1yAptUwU9eh7sT1RQWbqBNNlyEGyuNw==
x-amz-cf-pop: HAM50-C3
x-cache: Error from cloudfront

Versions

  • OS/Environment:
    @sls-next/serverless-component@1.17.0
    "next": "^10.0.0",

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions