# Image is not Loading using Texture Loader

**URL:** <https://discourse.threejs.org/t/image-is-not-loading-using-texture-loader/23846>\
**Category:** Questions\
**Tags:** caching, texture-loader, cors\
**Created:** [February 25, 2021, 1:19pm UTC](https://discourse.threejs.org/t/image-is-not-loading-using-texture-loader/23846 "2021-02-25T13:19:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anuj\_Bagerwal](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/anuj_bagerwal/32/15071_2.png) [@Anuj\_Bagerwal](https://discourse.threejs.org/u/Anuj_Bagerwal)\
**Post date:** [February 25, 2021, 1:19pm UTC](https://discourse.threejs.org/t/image-is-not-loading-using-texture-loader/23846/1 "2021-02-25T13:19:21Z")

</div>

Hello Guys,  
Greeting ! Thanks in advance

I am getting error while loading image using Texture Loader. In chrome when we disable catch image is loading perfectly, when we off disable catch it give error from three.js. I tryed with Mozilla firefox it is working fine. we don’t need to enable disable catch option.

I tried with `THREE.Cache.enabled = true.`, `THREE.Cache.enabled = false.` and it’s clean(), but nothing works.

when we off disable cache it give us cors error, and we check from backend we already set \* for that, it is specifically not working in chrome.

you can suggest me how to disable cache from three.js side or react js side (without jquery involve). Thank you.

```
const loader = new THREE.TextureLoader();
const floorTexture = loader.load(markerImg?.url, (img) => {
  img.needsUpdate = true;
  img.crossOrigin = "";
  floor.scale.set(1.0, img.image.height / img.image.width, 1.0);
});
floorTexture.wrapS = floorTexture.wrapT = THREE.RepeatWrapping;
const floorMaterial = new THREE.MeshBasicMaterial({
  map: floorTexture,
  side: THREE.DoubleSide,
});

const floorGeometry = new THREE.PlaneGeometry(1000, 1000, 10, 10);
floor = new THREE.Mesh(floorGeometry, floorMaterial);
floor.geometry.computeBoundingBox();
floor.geometry.needsUpdate = true;
const sizeOfMarker = floor.geometry.boundingBox.clone();
floor.position.y = -10;
floor.rotation.x = -Math.PI / 2;
scene.add(floor);![Screenshot from 2021-02-25 18-29-53|690x388](upload://fO85nO6wkyeHZCg88XSilbinXRW.png) ![Screenshot from 2021-02-25 18-29-36|690x388](upload://xrMMQfp2qhJHQHTFRnartKGSNA9.png) ![Screenshot from 2021-02-25 18-29-23|690x388](upload://wQ9ZGQeE7mxjz7P8b0QSaRLvGO6.png)
```

---

<div class="post-metadata">

**Author:** ![Anuj\_Bagerwal](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/anuj_bagerwal/32/15071_2.png) [@Anuj\_Bagerwal](https://discourse.threejs.org/u/Anuj_Bagerwal)\
**Post date:** [February 25, 2021, 1:19pm UTC](https://discourse.threejs.org/t/image-is-not-loading-using-texture-loader/23846/2 "2021-02-25T13:19:59Z")

</div>

![Screenshot from 2021-02-25 18-29-53](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/e/6ecb4c6c63bfee8c1b90d14e6ad1acc8652cbf44.png) ![Screenshot from 2021-02-25 18-29-36](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/a/ea6bd8a936ce542949b03770003f37c3e42d9f75.png) ![Screenshot from 2021-02-25 18-29-23](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/6/e62b05f16ac0b6cabb41d8d39e5786574336bea2.png)

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [February 25, 2021, 4:03pm UTC](https://discourse.threejs.org/t/image-is-not-loading-using-texture-loader/23846/3 "2021-02-25T16:03:10Z")

</div>

Just a note - please keep in mind three [Cache](https://github.com/mrdoob/three.js/blob/8514f004072d5e33a964f347d17c3d33cb3cd5a7/src/loaders/Cache.js) is an in-memory cache - ie. all the assets you load are kept in memory, preventing them from ever being garbage collected. That’s probably very much not what you’d like - what you are looking for is probably just request caching and that is usually handled natively by the browser (without leaking the memory.)
