react-cropper - Not working with images stored in aws s3

100 views Asked by At

React cropper does not work for aws s3 stored images either publicly stored or privately stored pre-signed images.

When I set props checkCrossOrigin={false} the images loads but got error on cropping.

Failed to execute 'toDataURL' on 'HTMLCanvasElement': 
Tainted canvases may not be exported. 
<Cropper
  ref={cropperRef}
  style={{ height: 400, width: '100%' }}
  zoomTo={0.5}
  initialAspectRatio={1}
  preview=".img-preview"
  src={image}
  viewMode={1}
  minCropBoxHeight={80}
  minCropBoxWidth={80}
  background={false}
  responsive
  autoCropArea={1}
  checkOrientation={false}
  guides
/>

0

There are 0 answers