Convert images to tensor

Hi, I am trying to train this model:

model.fit(X_train,
y_train,
batch_size=59,
epochs=50)

But I keep getting this error:
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type tensorflow.python.framework.ops.EagerTensor).

The problem seems to be the format of the images I am trying to feed the model.
Does anyone had a similar problem and can help?