Replace image texture on Material Properties via Python

Im tryng to change front.png to front_mat.png image in material properties via ptyhon but do not work. How to proced?

bpy.data.materials["Front"].node_tree.nodes["Image Texture"].image.name = 'front_mat.png'

You would probably want to change the image, not its name.

Sure but how? using .load do not work

Haven’t tested it but something like this:

bpy.data.materials["Front"].node_tree.nodes["Image Texture"].image = bpy.data.images["front_mat.png"]

Still not work,

Builtin Modules:       bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports:   from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data

Found it:bpy.data.images['front.png'].filepath = '//front_mat.png'

Change material texture by loading an external .png file with Python