added if/else for gallery images on home page