React image parser component Sample in 2020

React image parser component Sample in 2020


tutorials -

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:

GitHub

Trending On Tutorial Stuff

Our Sponsors

Top Applications in Tutorial Stuff

Top Experts In Tutorial Stuff