Skip to content

Error Exporting Merged Image using Fabric.js in Local HTML: 'Tainted canvases may not be exported #120867

Discussion options

You must be logged in to vote

Yep, this is what I mentioned in your last discussion here.

The problem lies with CORS. Some images come from an origin that is not the webserver the website is from. If both, the images and the website is offline (local), this is quite annoying. The solution is to have a local webserver serve the website and images. (No change to the code should be needed.) For example, you may execute in the directory of the html page and images

python3 -m http.server

then visit localhost:8000/website.html where website.html is the name of your file. There is no other way, as far as I know. toBlob, etc. will give the same result. If you are still trying to overlay images then you may want to look at mer…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tayllana
Comment options

Answer selected by tayllana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Programming Help Programming languages, open source, and software development.
2 participants