Can't texture a plane created using BMesh API
Add a UV layer.
Speculating that the issue here is having no UV map when assigning image texture. The blue colour seen in question is likely pixel (0, 0) of your image, since without a UV layer will use default UV value of (0, 0) for all
By default most faced add primitive operators create UV's by default
bpy.ops.mesh.primitive_plane_add(calc_uvs=True)

if creating with bmesh as in question code will need to create the UV map, either as below by adding as a bmesh loop uv layer
import bmesh
import bpy
from bpy import context

me = bpy.data.meshes.new(&quot;Foo&quot;)
bm = bmesh.new()
bm.loops.layers.uv.new(&quot;Foo&quot;)
bmesh.ops.create_grid(
    bm,
    size=1,
    x_segments=1,
    y_segments=1,
    calc_uvs=True,
    )
bm.to_mesh(me)

context.collection.objects.link(
    bpy.data.objects.new(&quot;Foo&quot;, me)
    )

or by adding a UV to the mesh when created
&gt;&gt;&gt; C.object.data.uv_layers.new(name=&quot;Foo&quot;)
bpy.data.meshes['Foo'].uv_layers[&quot;Foo&quot;]