Skip to content

fix(next/image): include response status in invalid image errors - #96985

Open
Fastering18 wants to merge 1 commit into
vercel:canaryfrom
Fastering18:fix/image-redirect-status
Open

fix(next/image): include response status in invalid image errors#96985
Fastering18 wants to merge 1 commit into
vercel:canaryfrom
Fastering18:fix/image-redirect-status

Conversation

@Fastering18

@Fastering18 Fastering18 commented Aug 9, 2026

Copy link
Copy Markdown

When an upstream image response is a redirect, it often has no image content type. The existing error message then ends up saying something unhelpful like "received null".
This change threads the upstream HTTP status through the image optimizer so the diagnostic includes it. A focused regression test covers an internal 307 response and confirms the status shows up in the error.Focused tests, types, formatting, and linting all passed.

@Fastering18
Fastering18 marked this pull request as ready for review August 9, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant