How to automatically (or in script) select the type of loaded textures?

Uploaded images obtained type of “texture”. I want automatically (or in script) to do the type of “Legacy GUI”.
78548-cover.png

solved. OnPreprocessTexture