if else statement for images