Skip to content

"Use the Image component" with astro dev when using react #15048

@thethunderturner

Description

@thethunderturner

Astro Info

Astro                    v5.16.6
Node                     v25.2.1
System                   Linux (x64)
Package Manager          unknown (its pacman)
Output                   static
Adapter                  none
Integrations             @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Astro dev audit complaining about <Image> component in React

When Im importing or trying to display an image in react with , Astro dev audit tool complains that its inefficient, and that I should use Image component. Why? Im in React. Is it because its not "smart enough" that it cant understand I cant put an Image component there? Is there a way to fix this, or at least make it "not complain"?

What's the expected result?

It shouldnt say anything because I cant import Image component in react, and I cant always convert my react component to an astro component

Link to Minimal Reproducible Example

https://github.com/thethunderturner/astro-img-test

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)feat: toolbarRelated to dev toolbar (scope)good first issueGood for newcomers. If you need additional guidance, feel free to post in #contribute on Discord

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions