Issue with exporting mesh with textures as glb

I am trying to export mesh as glb using gltf exporter but it seems to break meshes with textures. I have recreated the issue here https://codesandbox.io/p/sandbox/rough-http-7hlk5l

it throws an error THREE.GLTFExporter: No valid image data found. Unable to process texture. if you check the console.

I think the problem is that you’re trying to start the export before the texture has been downloaded. Loading happens asynchronously, and the texture immediately returned from TextureLoader is not initialized. One way around this would be to await it instead:

const tex = await textureLoader.loadAsync('path/to/cat.jpeg')

But the same thing happens to the model too, if I load the model with texture and on its on load callback If i try to export it, it throws same error. Maybe I will try recreating it in example

I would expect loaders call their ‘load’ callback only after their textures have all loaded… but it’s possible some loaders do not. An example might be helpful yes.

Hello Bhushanctruh,
I think that we should insert UV map on the Blender for using image texture.