Resizing image on 3D Boxes

I need some help, obviously I’m doing something wrong/need more code that I don’t know what it is. I really need this to work using Javascript.

Let’s say I have a 3D Box that has a “front” face that is 100 x 100, and I have an image that is 250 x 250.

If I use the GDevelop command “Change the image of ‘front’ face of [box] to [image]”, the image is automatically resized and shows up on the box face.

However, if I use the Javascript commands:
/** @type {gdjs.Cube3DRuntimeObject} */
const thebox1 = runtimeScene.getObjects(“box”);
thebox1[0].setFaceResourceName(“front”, “image.png”);

then the image does not resize, it does not show up on the box, and I’m left with the purple broken image on my box face.
That Javascript code DOES work if the image is smaller than the box face.

Any idea what I can do to get the image to automatically resize using Javascript??

Clarification: that Javascript code DOES work ONLY SOMETIMES if the image is smaller than the box face. Sometimes it doesn’t!! What the junk is the problem here??

Found a workaround…

I have 45 images that I want to use randomly, so using the Javascript is really needed here.

Before the Javascript, I use the GDevelop command to change the box to each. separate. image. needed. This seems to put the resized image into some sort of cache that then is available to use later by the Javascript?

Why is this so annoying -_-