Cancelling the timer every time a photo is shown.