next/image Image not useable if image requires Authentication #63305
Devian1988
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
I have a Server which serves images. The server requires an authentication token present and valid in headers.
Next Image Component load such an image via middleware (i think for optimisation reasons). The middleware calls the external api for the image without authentication headers so i get an 401. I think would be great to modify the header of this Request at runtime to store authentication header.
Proposal
New property at Image component to provide a callback function to modify headers.
Beta Was this translation helpful? Give feedback.
All reactions