React-Image-Parser

With this component you can easily parse the image data.

Install:

npm i react-image-parser

Add:

import ImageParser from 'react-image-parser';

Use:

<ImageParser
    img={'./path/to/image'}
    maxImgSideSize={400}
    onImageData={data => console.log(data)}
/>

Props:

Name Type Required Default Description
img String Yes null Path to image. For example, './my/image/path.png'
maxImgSideSize Number No bigger side of image The maximum size of the sides of the canvas on which the image will be parsed.
onImageData Function No null The function in which the parsed data will be passed.

Data:

Data

GitHub