If I'm running a web server locally on port 3000 (or any port other than 80), and try to use cropper with an image from the web, cropper generates a 'Cross-Origin Resource Sharing policy' error.
If I remove the crossOrigin attribute code on L152, this error doesn't happen and the image gets appended appropriately.
Can we make the crossOrigin attribute optional?
If a cross-domain image misses the crossOrigin attribute, you willn't be able to export it from a canvas after you drawed it in, so when you call the getDataURL or rotate methods of the plugin, you will get a SecurityError error like this:
Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
if a cross-domain image misses the crossOrigin attribute, you willn't be able to export it from a canvas after you drawed it in
but what if I'm not using a canvas? am I missing something here?
All right! I can support this feature for someone who does not need the getDataURL and rotate methods, I will support this by add a new option.
hey this looks great! thanks :)
It is a cross-domain image, and I need use canvas method : getDataURL ,what should I do?
Most helpful comment
It is a cross-domain image, and I need use canvas method : getDataURL ,what should I do?