I believe what you want is to get the texture, correct? You can do this very easily by opening the inspector.
Unfold the ‘textures’.
Click on the texture you want and under the thumbnail, click on ‘edit’.
In the preview window, to the far right, click on the ‘save’ icon to retrieve the texture.
This isn’t specific to glTF. Once the asset is loaded, you have a Babylon texture. You can retrieve the contents of the texture by calling texture.readPixels and then use Tools.DumpDataAsync to get a Base64 string from the pixels.