You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi guys. i use the next version 13.1.1 . you might see that when requesting an image like https://example.com/_next/image?url=%2Fimages%2FheroImages.png&w=828&q=75 in the browser it loads the image but if i write the directory wrong, it sends an http response with status code of 400 and its message is "The requested resource isn't a valid image." and show a black page with this error message. so i want to ask you is there any way that i can customize this HTTP response with a custom status code and custom error message. know that my project has no backend and is a simple landing that only has ui.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
hi guys. i use the next version 13.1.1 . you might see that when requesting an image like https://example.com/_next/image?url=%2Fimages%2FheroImages.png&w=828&q=75 in the browser it loads the image but if i write the directory wrong, it sends an http response with status code of 400 and its message is "The requested resource isn't a valid image." and show a black page with this error message. so i want to ask you is there any way that i can customize this HTTP response with a custom status code and custom error message. know that my project has no backend and is a simple landing that only has ui.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions