Drawing over an Image with Opacity

What can I code so that the user can insert an image into the canvas and be able to draw over it and have the image with a slider to control its opacity and the 0 point of the slides makes the image transparent, and when user decides to remove the image, still have the drawing and still be able to edit/draw it.

Thanks for whoever responds