guys, i had been trying to convert image url to base64 (typescript) without any luck. can anyone help?
Have you checked this one?
1 Like
i just tried and got this error,
EXCEPTION: SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
browser_adapter.js:77 EXCEPTION: SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
UPDATE
i was able to fix that error by adding image.crossOrigin = 'Anonymous';
Works like a charm!! thanks a lot.
1 Like
Good to hear.
It is also fixable by setting the img
tag similar to:
<img crossOrigin="Anonymous"></img>