Describe the bug
Using attribute aspectRatio inside React import { Image } from "@unpic/react"; causes React Warning:
I use vite bundler.
Packages:
"react": "^18",
"react-dom": "^18",
"vite": "^8.0.0",
"@unpic/react": "^1.0.2",
React Warning message:
Warning: React does not recognize the `%s` prop on a DOM element.
If you intentionally want it to appear in the DOM as a custom attribute,
spell it as lowercase `%s` instead. If you accidentally passed it from a parent
component, remove it from the DOM element.%s aspectRatio aspectratio
To Reproduce
Steps to reproduce the behavior:
- Write a React component
import { Image } from "@unpic/react";
export default function Component() {
<Image src={src} alt="alt" height={40} aspectRatio={3.76} />
}
- Launch
npm run dev
Expected behavior
No warnings.
Desktop (please complete the following information):
- OS: Ubuntu 24.04
- Browser: Chrome
- Version: 144
Describe the bug
Using attribute
aspectRatioinside Reactimport { Image } from "@unpic/react";causes React Warning:I use vite bundler.
Packages:
React Warning message:
To Reproduce
Steps to reproduce the behavior:
npm run devExpected behavior
No warnings.
Desktop (please complete the following information):