# Loading compressed textures from object url

**URL:** <https://forum.babylonjs.com/t/loading-compressed-textures-from-object-url/30861>\
**Category:** Bugs\
**Tags:** texture\
**Created:** [May 30, 2022, 10:17am UTC](https://forum.babylonjs.com/t/loading-compressed-textures-from-object-url/30861 "2022-05-30T10:17:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marian\_Becher](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/marian_becher/32/24613_2.png) [@Marian\_Becher](https://forum.babylonjs.com/u/Marian_Becher)\
**Post date:** [May 30, 2022, 10:17am UTC](https://forum.babylonjs.com/t/loading-compressed-textures-from-object-url/30861/1 "2022-05-30T10:17:23Z")

</div>

I’m not sure if it is really a bug or an intended way. But I’m not able to load compressed textures with an object url. The reason for that is probably because the file extension is missing.

In our use case it is for example a -dxt.ktx file, that we preload as a blob and then create an object url. Reason for that is simply, that we have to do some precalculation with the blob.

I’ve noticed in the API that `Engine.createTexture` has an optional Parameter `forcedExtension`. However, the constructor for a Texture does not provide this parameter and always passes ‘null’ to the engine function.  
In this Thread I’ve seen that there is already a solution for CubeTextures [https://forum.babylonjs.com/t/urls-that-lack-extensions/11757](https://forum.babylonjs.com/t/urls-that-lack-extensions/11757)

Playground (with an -dxt.ktx file as example):

> **[Babylon.js Playground](https://playground.babylonjs.com/#6ZPZND%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<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:** [May 30, 2022, 2:59pm UTC](https://forum.babylonjs.com/t/loading-compressed-textures-from-object-url/30861/2 "2022-05-30T14:59:13Z")

</div>

Do you want to create a PR for it ?

---

<div class="post-metadata">

**Author:** ![Marian\_Becher](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/marian_becher/32/24613_2.png) [@Marian\_Becher](https://forum.babylonjs.com/u/Marian_Becher)\
**Post date:** [May 30, 2022, 3:18pm UTC](https://forum.babylonjs.com/t/loading-compressed-textures-from-object-url/30861/3 "2022-05-30T15:18:28Z")

</div>

sure, I’ll look into it tomorrow
