next/image "url" parameter is valid but upstream response is invalid
Problem
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) Image optimization (next/image, next/legacy/image) Link to the code that reproduces this issue or a replay of the bug https://github.com/luca-vogels/bug-next-image To Reproduce Run `npm run dev` or `npm run build && npm run start` Describe the Bug When using next with a custom server like express images are not displayed anymore. Default next image uses following route for fetching optimized images: `/_next/image/?url=...&w=...&q=...` However opening this route returns following error: `"url" parameter is valid but upstream response is invalid` Expected Behavior Optimized image is returned Which browser are you using? (if relevant) 115.0.5790.111 How are you deploying your application? (if relevant) npm run start <sub>NEXT-1681</sub>
Error Output
error: `"url" parameter is valid but upstream response is invalid`
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: next/image "url" parameter is valid but upstream response is invalid
> > I've encountered a similar issue in the project I'm working on. > > It occurred when I attempted the following version upgrade: > > [code block] > > Yeah, I confirm that versions above v13 don't work. Only v12 doesn't have problems with the images. The same issue seems to occur when upgrading from: [code block]
Trust Score
5 verifications
- 1
> > I've encountered a similar issue in the project I'm working on.
> > It occurred when I attempted the following version upgrade: > > [code block] > > Yeah, I confirm that versions above v13 don't work. Only v12 doesn't have problems with the images.
- 2
The same issue seems to occur when upgrading from:
[code block]
Validation
Resolved in vercel/next.js GitHub issue #53715. Community reactions: 12 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep