Is it feasible to overlay a transparent-background image onto another image using JavaScript? For example, if you have a website featuring various product pictures and some of these products are recalled, can you superimpose the Do-Not-Enter sign (circle-with-slash icon) on those images without altering the original images? The intention is to maintain the visibility of the original picture while adding the overlay.
Would placing the transparent-background image inside a DIV element without opacity, sizing both the image and its container based on the dimensions of the original image using clientWidth and clientHeight, and positioning the DIV over the original image be a suitable approach? If the window is resized or the layout changes dynamically, how would you instruct the superimposed DIV to adjust to the new location of the original image? Is there an event like LayoutChangedEvent to handle this scenario? Would monitoring the position of the original image periodically using setInterval be necessary?