Skip to content

Signed images from S3 no longer working with next/image #23523

@jonahallibone

Description

@jonahallibone

EDIT

It seems to only be an issue with certain images (these images worked in the prior version of Next.js and still do). These images that error tend to also be the ones which are frequently loaded because of the pages I use to test my platform. Is there a chance something changed with the caching I need to clear (have already wiped .next a few times to no avail). As far as I can tell, the images which are erroring are the ones I loaded from the external domain prior to upgrading. One's I did not load prior to upgrading still worked. I have tested in multiple browsers and in incognito to make sure there isn't a browser cache issue, and haven't been able to resolve the issue. See comment here

What version of Next.js are you using?

10.1.1

What version of Node.js are you using?

14.16.0

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

Not currently deployed

Describe the Bug

Previously, pulling signed images from my S3 bucket worked fine with next/image. In fact, if I do a normal <img src="https://url-to-my-bucket/image.jpg?X-Amz-Algorithm...." /> it still works. Since 10.1.1 however, next/image is now reporting The requested resource isn't a valid image. when I pass it the same url which worked fine previously, and still works fine in a native image tag. I have downgraded to verify that it is in fact a new behavior since the latest version of [email protected]

Expected Behavior

The image would return and display

To Reproduce

Pass next/image a signed url from an Amazon S3 Bucket

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions