Update code for button that controls displayed image