-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
What version of Next.js are you using?
11.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?
serverless-next.js
Describe the Bug
My images are served via S3 and signed urls. They worked locally (using next dev
) until I upgraded to [email protected] this morning. I previously had an issue with this, where the MIME types were binary/octet-stream
but have since changed the MIME types to image/jpg
, and have had no trouble since then. I also now know that image/jpeg
is preferable to image/jpg
however I am unsure if this is the issue. The only error I get back is
"url" parameter is valid but upstream response is invalid
If I downgrade to [email protected], the issue is resolved.
Expected Behavior
Next image would return me my optimized image, not a 400 bad request with
"url" parameter is valid but upstream response is invalid
I see that in next.js/image-optimizer.ts this comes from a failed fetch on the href. I am curious why this would be the case now, and not in previous versions. Thinking perhaps this was a CORS error (somehow, really just trying anything) I changed my bucket policy. Error persists.
To Reproduce
Use an image signed by S3 with the MIME type of image/jpg