I have been recently introduced to CORS. After researching about it, I'm still not sure if this is what I need.
From my understanding it seems that CORS allows you to access, for example, a php file that contains Access-Control-Allow-Origin:"access.me.com". But it can't allow you to access an image. How am I supposed to write that in an image?
I have this function that checks if an image from an outside url exists. But I can't run it due to the same-origin-policy. How am I supposed to check if those images exist?
function fileExists(file_url){
var http = new XMLHttpRequest();
http.open('HEAD', file_url, false);
http.send();
return http.status !== 404;
}