vercel / vercel/next.js

[Regression] AVIF fails to render with The requested resource isn't a valid image for ... received null

Open
#84,187 9 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Image (next/image)
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/brave-goodall-pnz3tm

To Reproduce
  1. Open https://codesandbox.io/p/devbox/brave-goodall-pnz3tm
  2. View Preview and notice broken image.
  3. View terminal and notice output:
 ⨯ The requested resource isn't a valid image for /_next/static/media/atgiftcard.81b93929.avif received null
Current vs. Expected behavior

I expect the image to render.

Provide environment information
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.6.0-canary.27 // Latest available version is detected (15.6.0-canary.27).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.3.3
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

I'll do some additional debugging.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked CodeSandbox with Next.js 15.6.0-canary.27 in next dev and confirm the AVIF failure through the next/image area. Trace the image handling involved in the reported error; done means the AVIF renders in the preview without the invalid-image message.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.