Refactor conditional if to show images.