Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-image-uploader-fa

React library for the selection, edition and compression of images in png, jpeg and webp formats and has farsi language

react, image picker, image upload, image editor, image filters, image compression, image, compress image, cropping images, farsi, فارسی

readme

Installation

npm i react-image-uploader-fa --save

or yarn

yarn add react-image-uploader-fa

Usages

You must import the following where you will use it:

...
import ReactImagePickerEditor, { ImagePickerConf } from "react-image-uploader-fa";
import "react-image-uploader-fa/dist/index.css"
...
  const config: ImagePickerConf = {
    borderRadius: '8px',
    language: 'fa',
    width: '330px',
    height: '250px',
    objectFit: 'contain',
    compressInitial: null,
  };
  // const initialImage: string = '/assets/images/8ptAya.webp';
  const initialImage = '';

 return <>
       ...
        <ReactImagePickerEditor
            config={config}
            imageSrcProp={initialImage}
            imageChanged={(newDataUri: any) => {
                setImageSrc(newDataUri);
            }}
            imageDeleted={() => console.log("delete")}
            imageUploaded={() => console.log("upload")}
            imageDownloaded={() => console.log("download")}
            imageEdited={() => console.log("edit")}
        />
        </>
      ...
#