added previous image to hide if it doesnt exist