general image display function implemented