vercel / vercel/next.js

Using next/image adds `blurwidth` and `blurheight` attributes

Open
#56,511 3 comments 9 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://codesandbox.io/p/sandbox/zen-surf-33vcdj?file=%2Fpages%2Findex.tsx%3A2%2C46

To Reproduce
  1. Open code sandbox
  2. Check out the DOM and find the img element.
  3. See how it has unsupported attributes
  4. Check out build console where React is warning about it
CleanShot 2023-10-06 at 10 53 03@2x
Current vs. Expected behavior

There should be no unsupported attributes added to the IMG tag

Verify canary release
  • I verified that the issue exists in the latest Next.js canary release
Provide environment information
Whatever CodeSandbox uses. I'm on Mac M1 but it doesn't matter since it's not related to the environment but React code.
Which area(s) are affected? (Select all that apply)

Image optimization (next/image, next/legacy/image)

Additional context

It's been around since next@12 initial next/image I believe.

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 with the linked CodeSandbox reproduction and inspect the next/image output in the DOM and build console. Trace the image optimization component responsible for the img element, then verify that the unsupported attributes and React warning are absent while the existing image behavior remains intact.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.