Change color space of image texture node using python? I have trouble to get a script working within Blender 2.8. What is the correct way to change Color Space mode of an image texture node?

node_opacity = nodes.new(type="ShaderNodeTexImage")
node_opacity.colorspace_settings.name = "Linear"
The colorspace is shown from the image data, it is not a node property.

node_opacity.image.colorspace_settings.name = 'Linear'