Image not loading

I am trying to get an image to appear on the screen, but all that shows is the green box with the slash through it. I have

this.load.image('ace', 'assets/ace.png');

in my ‘create()’ function, and

this.add.image(100, 100, 'ace');

in my ‘update()’ function. As I said, the green box shows at coordinates (100, 100)…why isn’t the image loading? I’ve tried every file path I can think of (e.g. ‘./assets/ace.png’, ./src/assets/ace.png’, etc.) but nothing works. My file structure is

index.html
src/
    index.js
    assets/
        ace.png

Any help is much appreciated!

Also, I would put the loading in a preload function but for some reason it is erroring, saying my preload is undefined…which doesn’t make any sense to me either because my scene includes it

scene: {
    preload: preload,
    create: create,
    update: update
}

I sort of solved my problem…

I had my config object created in a different module, but did not import the preload() function for the scene to access.