# Help needed for loading gltf with blob or arraybuffer

**URL:** <https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899>\
**Category:** Questions\
**Tags:** tutorial\
**Created:** [January 19, 2022, 3:36am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899 "2022-01-19T03:36:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![decafbagel](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/decafbagel/32/21345_2.png) [@decafbagel](https://forum.babylonjs.com/u/decafbagel)\
**Post date:** [January 19, 2022, 3:36am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/1 "2022-01-19T03:36:03Z")

</div>

Hi guys, new here. great community

I’ve been staring at the doc for a while, I’m still having a hardtime trying load a basic gltf model from loose files.  
i have .gltf .bin .pngs in memory, blob or buffer either one is fine  
how do i go about loading the model? please share  
(not considering glb)

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [January 19, 2022, 3:43am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/2 "2022-01-19T03:43:14Z")

</div>

Hello and welcome!

Maybe this example will help - [https://playground.babylonjs.com/#7F6S08#2](https://playground.babylonjs.com/#7F6S08#2)

---

<div class="post-metadata">

**Author:** ![decafbagel](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/decafbagel/32/21345_2.png) [@decafbagel](https://forum.babylonjs.com/u/decafbagel)\
**Post date:** [January 19, 2022, 4:22am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/3 "2022-01-19T04:22:21Z")

</div>

thanks for the quick reply, I saw this example in the doc.

but what about sub resources like textures?

let’s just use this example you shared, if there are resources like textures referenced by the gltf, how do i load or prep them so the loader can correctly pick them up?

thank you for the help

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [January 19, 2022, 5:05am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/4 "2022-01-19T05:05:34Z")

</div>

Well, just for textures it is simple, like

```auto
    var res = await fetch('/textures/palm.png');
    var blob = await res.blob();
    var blobURL = URL.createObjectURL(blob);

```

But the problem is with references. There could be different ways to solve them, and currently I am not sure which is better. Here is quite a long thread about it - [Modify gltf in runtime,fallback for textures](https://forum.babylonjs.com/t/modify-gltf-in-runtime-fallback-for-textures/5804)  
Pinging @bghgary , GLTF master 🙂

---

<div class="post-metadata">

**Author:** ![decafbagel](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/decafbagel/32/21345_2.png) [@decafbagel](https://forum.babylonjs.com/u/decafbagel)\
**Post date:** [January 19, 2022, 5:47am UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/5 "2022-01-19T05:47:25Z")

</div>

thank you so much for helping.

yea the references are giving me problems. ive seen some discussion about hooking into gltfloader’s preproess url to fix up the path. i dont have a clear mental picture yet, but will look into it some more

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [January 19, 2022, 8:37pm UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/6 "2022-01-19T20:37:49Z")

</div>

Yes, that should work. Another thread (slightly shorter), about the same kind of question.

[https://forum.babylonjs.com/t/does-gltf-loader-support-loading-separate-blob-stream/26602](https://forum.babylonjs.com/t/does-gltf-loader-support-loading-separate-blob-stream/26602)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [February 18, 2022, 6:46pm UTC](https://forum.babylonjs.com/t/help-needed-for-loading-gltf-with-blob-or-arraybuffer/26899/7 "2022-02-18T18:46:22Z")

</div>

Hello @decafbagel just checking in, do you still have any questions? 🙂
