K
K
Kusmich2015-09-15 12:37:02
JavaScript
Kusmich, 2015-09-15 12:37:02

Why can't save images to localStorage?

Where is the error in the code? I'm trying to save an image from google by url to local storage, then get the image from the storage and insert it into the DOM.

Here is my code :

<canvas  id='example'></canvas>
<img id="imageId" src="" >


Here is the whole code: jsfiddle.net/t52ka/123

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita K., 2015-09-15
@bonilka

Look here. jsfiddle.net/bonilka/2f1kj48g
Added crossOrigin="Anonymous" attribute to img tag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question