chore: remove unused code from image optimizer (#98060)
This PR removes some unused code from the image optimizer. - Remove redundant MIME validation - Remove unreachable fallback error These used to be necessary until PR https://github.com/vercel/next.js/pull/82118 removed the fallback. Before 82118: ```js upstreamType = detectContentType(upstreamBuffer) || imageUpstream.contentType?.toLowerCase().trim() ``` After 82118: ```js upstreamType = detectContentType(upstreamBuffer) ``` Now there is never a case where upstreamType is invalid since its already been validated, there is no more fallback.
Showing
Please
register
or
sign in
to comment