Simple canvas image preview
<ImagePreview file={this.state.files[0]}
width={500} height={500}
style={{background: '#eee'}}
onError={() => {alert('error')}} />
git clone https://github.com/kxmatejka/image-preview
npm install
npm run start
and visit localhost:3000/demo/
- tests
- default image
- loader icon
- custom setting (max size, only selected formats...)
- multiple files support
- gif support
- publish to npmjs.com