Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b909772d
Unverified
Commit
b909772d
authored
Apr 25, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Apr 25, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[next/image] Stop using deprecated `url.parse` (#93208)
parent
5ccc1cc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
image-optimizer.ts
packages/next/src/server/image-optimizer.ts
+3
-4
No files found.
packages/next/src/server/image-optimizer.ts
View file @
b909772d
...
...
@@ -7,7 +7,6 @@ import imageSizeOf from 'next/dist/compiled/image-size'
import
{
detector
}
from
'next/dist/compiled/image-detector/detector.js'
import
isAnimated
from
'next/dist/compiled/is-animated'
import
{
join
}
from
'path'
import
nodeUrl
,
{
type
UrlWithParsedQuery
}
from
'url'
import
{
getImageBlurSvg
}
from
'../shared/lib/image-blur-svg'
import
type
{
ImageConfigComplete
}
from
'../shared/lib/image-config'
...
...
@@ -31,7 +30,7 @@ import * as Log from '../build/output/log'
import
isError
from
'../lib/is-error'
import
{
isPrivateIp
}
from
'./is-private-ip'
import
{
getOrInitDiskLRU
}
from
'./lib/disk-lru-cache.external'
import
{
parseUrl
}
from
'../lib/url'
import
{
parseUrl
,
parseReqUrl
}
from
'../lib/url'
import
type
{
CacheControl
}
from
'./lib/cache-control'
import
{
InvariantError
}
from
'../shared/lib/invariant-error'
import
{
lookup
}
from
'dns/promises'
...
...
@@ -380,7 +379,7 @@ export class ImageOptimizerCache {
static
validateParams
(
req
:
IncomingMessage
,
query
:
UrlWithParsedQuery
[
'query'
],
query
:
Next
UrlWithParsedQuery
[
'query'
],
nextConfig
:
NextConfigRuntime
,
isDev
:
boolean
):
ImageParamsResult
|
{
errorMessage
:
string
}
{
...
...
@@ -993,7 +992,7 @@ export async function fetchInternalImage(
maximumResponseBody
,
})
await
handleRequest
(
mocked
.
req
,
mocked
.
res
,
nodeUrl
.
parse
(
href
,
true
))
await
handleRequest
(
mocked
.
req
,
mocked
.
res
,
parseReqUrl
(
href
))
await
mocked
.
res
.
hasStreamed
if
(
!
mocked
.
res
.
statusCode
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment