[Solved] How to stack a image in top of another with javascript

How can I use javascript to stack (combine) two images, one in top of another, so I can apply it to a sprite?

I tried many things like creating a pixi texture, pixi container, pixi sprites, etc, but I cant get it to work…

I tried custom objects but at the end of the day they still require to use 2 separated objects anyways…

I am trying to achieve this because I made an inventory but it will have several types of slots (different types of wood, a metal slot, colored slots…)

And I think there is a better solution than just copying the image of all the items and creating a different background for every single slot.

Also it will not be possible to use 2 objects in top of another, my inventory has 100 maximum slots & 100 text objects to indicate the items amount, so if I add more 100 objects to it, the game performance when opening the inventory will decrease way more than it already does.