Get Texture Image from glb file

Hi all,

how can i extract texture image from glb file?

I’ve tried the method on this topic Get texture source from GLB files but still not working

this is my PG:

thank you :slight_smile:

You’re very close, you can get the textures from the asset container like so assets.textures this will give you an array with all the textures in the .glb scene. Once you have them you can easily assign them to another material.

Here it is in the playground.

but I want the texture image to be used on the img.src element. is there a way to convert that texture into an image file?

finally I found the answer :grin:, I took the buffer from the texture then changed it to base64 and put it into the image element.

this is my PG :