How to get image drawn in canvas (The operation is insecure)
See original GitHub issueHi i want little bit optimization my images and i use for this canvas,
Currently i have this code
const context = canvas.getContext('2d', { alpha: false });
const image = new CanvasImage(canvas)
image.src = 'https://res.cloudinary.com/pozna/image/upload/v1564828195/fpztmajxhmphfpaechfa.jpg';
canvas.width = width;
canvas.height = 600;
image.addEventListener('load', () => {
context.drawImage(image, 0, 0, 500, 500).then(() => {
// here i want get image url or other data
});
});
Can anyone help me? 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:22 (4 by maintainers)
Top Results From Across the Web
canvas.toDataURL() Security Error The operation is insecure
Drawing video data on the canvas sets the origin-clean flag to false, which stops you from getting the image data in any way....
Read more >Why does canvas.toDataURL() throws a security exception?
Tainted canvas is not considered secure. Trials to retrieve image data from the canvas will lead to failure indicated by security exceptions.
Read more >canvas.toBlob(function(blob)) is giving SecurityError
Tainted canvas happens, when you load some CORS insecure third-party (cross-domain) image into your map (canvas).
Read more >SecurityError: The operation is insecure in canvas.toDataURL
HTML : SecurityError: The operation is insecure in canvas.toDataURL [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >canvas todataurl security error
Canvas drawing pictures, because of the security of the browser, if you use the canvas drawing process, using the image resources in Outland,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a general HTML Canvas issue. Check this discussion: https://stackoverflow.com/questions/25753754/canvas-todataurl-security-error-the-operation-is-insecure. Closing as it is not relevant only for this project.
I am facing the same issue when I am upgrading react native to 0.59.8. and using react-native-webview 6.1.0