How to add 2D button image?

Hi,

I am trying to add 2d button. It works to set background color, but not set background image.

The reason seems that it can not locate the image under the assets folder.

const button = document.createElement(name);

button.style.position = 'absolute';
button.style.zIndex = zIndex;

button.style.top = top;
button.style.left = left;
button.style.width = width;
button.style.height = height;

button.style.backgroundImage = 'url(./assets/add-emoji.png)'
button.style.backgroundSize = 'cover'