Images are displayed in the order they're drawn. Thus if you want image1 to be infront of image2 then you'll have to draw image1 first and then image2.
How you'll be keeping track of the ordering is a problem, which can be solved in many, many different ways. A 'general' soltuion is to give every object a certain z-value and sort the objects after that value.