vercel / vercel/next.js

Image Component flicker when refresh the page

Open
#71,077 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 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://github.com/jizhi0v0/background-image-flash.git

To Reproduce

1.Start the application in development (next dev)
2.refresh the page
3.image flash

Current vs. Expected behavior

https://github.com/user-attachments/assets/a6098447-ed5a-4530-ad2b-1dd4aa7e7581

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Mon Sep 30 00:10:38 PDT 2024; root:xnu-11215.40.63~39/RELEASE_ARM64_T6031
  Available memory (MB): 36864
  Available CPU cores: 14
Binaries:
  Node: 22.3.0
  npm: 10.8.1
  Yarn: 1.22.22
  pnpm: 9.6.0
Relevant Packages:
  next: 14.2.15 // Latest available version is detected (14.2.15).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.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

Also exist in latest canary version.

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 reproduction project with next dev and refreshing the page to confirm the image flash. Investigate the next/image behavior in the development stage and compare it with the latest canary version. Done means the reproduction no longer flickers on refresh while preserving expected image loading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.