-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
"url" parameter is valid but upstream response is invalid — next/image on 11.1 #27973
Comments
Can you share the URL thats failing? The issue might be caused by one of these PRs: |
Have the same problem for images that are served via firebase. Here the image url |
It looks like the issue is caused by #27671 I'll submit a PR with a fix, thanks! |
- Fixes #27973 - Reverts #27671 The problem with PR #27671 is that it was encoding too often when it really only needed to solve the bug for `next build && next start` since `next dev` was already working. This PR uses the alternative solution mentioned here #27210 (comment)
This has been fixed in v11.1.1-canary.5. You can try it out today with |
Can confirm |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
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 Next.js@11.1 this morning. I previously had an issue with this, where the MIME types werebinary/octet-stream
but have since changed the MIME types toimage/jpg
, and have had no trouble since then. I also now know thatimage/jpeg
is preferable toimage/jpg
however I am unsure if this is the issue. The only error I get back isIf I downgrade to Next@11.0.1, the issue is resolved.
Expected Behavior
Next image would return me my optimized image, not a 400 bad request with
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
The text was updated successfully, but these errors were encountered: