How to rotate ImageTexture within ItemList?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Trollend

I have an ItemList. The user can drag and drop images from their computer onto the item list, at which point ImageTextures are created and added to the ItemList with the following code:

var image = Image.new()
image.load(file)
var texture = ImageTexture.new()
texture.create_from_image(image)
add_icon_item(texture, true)

This works fine for photos that are landscape, but for portrait photos, they are added sideways. I would like the user to be able to select images within the ItemList and rotate them as they see fit, but I haven’t discovered a way of doing this. ImageTexture does not appear to have any properties that allow for rotation, and the ItemList node only allows Textures to be added, meaning you can’t add a Node2D first with a Texture child and then rotate the entire Node2D.

Is there any way to rotate Textures within an ItemList?