It seems a simple to solve s3 cross domain issue, but I spent a lot of time to fix it. Maybe you will have similar issue, please try my solution if it works, if not, please let me know.
set cross domain config
To solve S3 cross domain, first you need setup the config on s3 bucket like below:
See more information from amazon document.
change your code
If you use element to display the s3 image, now it’s end. But if you want to Image object to access it you have to continue:
You see we have set the image.crossOrigin value. Note you have to use ‘https’ s3 link, not ‘http’. You can find a real case from this blog.
Trouble Shooting
If you code still cannot work on chrome, maybe you have same issue like me. Actually it seems there is a bug on chrome, because Safari and Firefox work well. In my code, I have a thumbnail image, which is a img element in html page. Once user click the thumbnail I need load that image via Image class to display in WebGL. I always fail to display it in WebGL on Chrome, but it works on Safari and Firefox.
Finally I find this fron stackoverflow: http://stackoverflow.com/questions/26352083/chrome-cors-cache-requesting-same-file-from-two-different-origins, which shows this is a Chrome bug, but to solve it I add timestamp at the end of image url liek below, so it works.