Skip to content

Next.js image placeholder blur attribute get updated with tailwind upgrade tool #16028

@Megaemce

Description

@Megaemce

What version of Tailwind CSS are you using?

4.0.1

What build tool (or framework if it abstracts the build tool) are you using?

Next.js 15.1.6

What version of Node.js are you using?

23.6.1

What browser are you using?

N/A

What operating system are you using?

Windows

Reproduction URL

  1. Have a sample Next.js project with Image component that have placeholder attribute set to blur like so
import Image from "next/image";

export default function Avatar() { 

return (
        <Image
            width={40}
            height={40}
            src={guideImage}
            placeholder="blur"
            quality={50}
            priority={true}
            alt={`${chatSettings.voice} avatar`}
            className="h-10 w-10 rounded-full bg-base-100"
        />
    );

}
  1. Run the npx @tailwindcss/upgrade@next
  2. Endup with code like so
import Image from "next/image";

export default function Avatar() { 

return (
        <Image
            width={40}
            height={40}
            src={guideImage}
            placeholder="blur-sm"  <-- it's mistaked for CSS class
            quality={50}
            priority={true}
            alt={`${chatSettings.voice} avatar`}
            className="h-10 w-10 rounded-full bg-base-100"
        />
    );

}

Describe your issue

Upgrading tool is mistaking a placeholder blur attribute with CSS class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions