0

I have loaded a remote image from Facebook on to my webpage. I am wanting to find where it is cached so I can get the src path to it so I can use it on my canvas. The problem I am having is when I try to set the Facebook src path it is giving me cross origin errors because it is not a local file. Is this something that HTML5 local storage might solve?

In the end I would like to have a path to the loaded image that does not involve me saving them to my server and pulling them down again.

3
  • You should probably use a data URL. Send the image to your server, have it convert it to a data URL, and then use that. Commented Sep 27, 2012 at 16:08
  • 1
    Are you trying to access the image from an iframe? Are you trying to get access to the pixels once loaded into the canvas? These are both restricted on cross-origin resources. Commented Sep 27, 2012 at 16:09
  • I am getting the images from the Facebook sdk so it gives me an actual image link. My thought process is that the image has to be 'saved' locally somewhere that I could reference. Commented Sep 27, 2012 at 16:13

1 Answer 1

2

you can do this by adding the image by jquery on the .load() because The window load event executes a bit later when the complete page is fully loaded,

Sign up to request clarification or add additional context in comments.

1 Comment

Does this give me a path to image or is it the image saved in the variable I called load with?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.