Issue with loading AKAMAI
images in dev
mod
#68367
Labels
bug
Issue was opened via the bug report template.
Image (next/image)
Related to Next.js Image Optimization.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/funny-glitter-28gnx5
To Reproduce
Issue in this line: https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/image-loader.ts#L32
I am using AKAMAI Image manager for serving the images in all environments. Image config used in
next.config.js
provided in CodeSandbox:While debugging, I got following image configuration:
yarn dev
Current vs. Expected behavior
Current
/
is not provided in the image src in prod build then there is no issue/
in image src if domains array is specified in image configExpected
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:13:18 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6030 Available memory (MB): 18432 Available CPU cores: 12 Binaries: Node: 20.15.1 npm: 10.7.0 Yarn: 1.22.22 pnpm: N/A Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: 14.2.5 react: 18.3.1 react-dom: 18.3.1 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The easiest fix could be adding leading
/
to imagesrc
but the question is why we have inconsistency between different environments? Is it expected behavior?The text was updated successfully, but these errors were encountered: