Switch images according to layout