Problem with broken images replaced by API

I changed the image of meterial through api


var image = new Image();

image.src = /australia.jpg;
image.crossOrigin = anonymous;
var imageTexture = viewer.createTextureFromHtmlImage(image);
viewer.findMaterial(potp07).baseColorTexture = imageTexture;

However, the text in the changed image looks a little broken depending on the angle.

I am curious if there is another setting that will prevent the text from appearing distorted in the replaced image.

Sounds like the aspect ratio of the replacing texture was different from the texture ratio of the replaced one. If this is the case, try resizing the canvas of the replacing texture to match the original aspect ratio.