Trying to display image (sprite) on mouseclick

Hi,
and welcome to the forum.

So, mouseClicked eventhandler draws an image as supposed. But then draw() is called and background command covers it. Draw() is called 60 times a second so background() in it covers everything every 1/60th second.

I would move background to setup(). Then you would set background only once at setup. You could also call noLoop() function to prevent draw() function calls.