Add if statement to photos thumbnail on index page.