Use blueimp-load-image in React
npm install load-image-reacttypescript
import { Image } from "load-image-react";
const SomeComponent = () => {
return (
<>
My Image
src="some-image-url.png"
loadOptions={{
downsamplingRatio: 0.5,
maxWidth: 200,
maxHeight: 200
}}
/>
>
);
};
`
$3
The loadOptions prop is passed into blueimp-load-image. canvas and orientation will always be set to true`.