# Add a crossOrigin = 'anonymous' for EquiRectangleCubeTexture

**URL:** <https://forum.babylonjs.com/t/add-a-crossorigin-anonymous-for-equirectanglecubetexture/24157>\
**Category:** Questions\
**Created:** [September 28, 2021, 1:51pm UTC](https://forum.babylonjs.com/t/add-a-crossorigin-anonymous-for-equirectanglecubetexture/24157 "2021-09-28T13:51:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorenje](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gorenje/32/18894_2.png) [@gorenje](https://forum.babylonjs.com/u/gorenje)\
**Post date:** [September 28, 2021, 1:51pm UTC](https://forum.babylonjs.com/t/add-a-crossorigin-anonymous-for-equirectanglecubetexture/24157/1 "2021-09-28T13:51:36Z")

</div>

Hi There,

I was just playing around with setting up a second host for models and images and ran into a CORS issue that  
would be fixed by adding a image.crossOrigin = ‘anonymous’ statement somewhere around here:

> <https://github.com/BabylonJS/Babylon.js/blob/d28a8921975edc450647368f6ec190347237e42f/src/Materials/Textures/equiRectangularCubeTexture.ts#L96>

I was wondering what is the take on adding crossOrigin assignments on all images? Am I wrong in thinking  
that there is a crossOrigin assignment missing there or is there a security issue if that is added?

(My endpoint did have the CORS headers, i.e. access-control-allow-origin: “\*”, so it wasn’t the server  
causing the error in the browser.)

Cheers!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 28, 2021, 2:54pm UTC](https://forum.babylonjs.com/t/add-a-crossorigin-anonymous-for-equirectanglecubetexture/24157/2 "2021-09-28T14:54:48Z")

</div>

This is definitely an issue as it should go to our common loadImage code path which is assigning this correctly. Also it would prevent other functionnality to be working for instance in worker and such.

I ll do a fix ASAP.

---

<div class="post-metadata">

**Author:** ![gorenje](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gorenje/32/18894_2.png) [@gorenje](https://forum.babylonjs.com/u/gorenje)\
**Post date:** [September 28, 2021, 3:10pm UTC](https://forum.babylonjs.com/t/add-a-crossorigin-anonymous-for-equirectanglecubetexture/24157/3 "2021-09-28T15:10:41Z")

</div>

Cool, thanks for quick response 👍
