You can change image's width, height, format, rotation and quality. It returns resized image's new base64 URI or Blob. The URI can be used as the source of an<Image>component. Setup Install the package: npm i react-image-file-resizer ...
npm i react-image-file-resizer or yarn add react-image-file-resizer Usage import Resizer from "react-image-file-resizer"; Resizer.imageFileResizer( file, // Is the file of the image which will resized. maxWidth, // Is the maxWidth of the resized new image. maxHeight, // Is the ...
I was trying to get the local image and tried to resize it, but getting this error.. Unhandled Rejection (TypeError): Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'. I have imported the file import s...