Im trying to make it so it will pull an image of your choice from the user:// folder, it then makes it a res:// image and sets it as an imagetexture to show up on a panel node to display it to you in-game. Ive tried as much as I could bit it always ends in an error. Last error says invalid set index 'texture' (on base: 'ImageTexture') with type: 'image'.
The local_data dictionary is the path.
match local_data["files"][id][id]["file_type"]:
"png":
var image = Image.new()
var preview_tex = ImageTexture.new()
image.load(game.local_data["files"][id][id]["image"])
var path_split = game.local_data["files"][id][id]["image"].split("//")
var res_path = "res://" + str(path_split[1])
preview_tex.create_from_image(image)
preview_tex.texture = image
image_preview.add_theme_stylebox_override("panel",preview_tex)
no_prev_label.hide()