Conditional update for thumbnail in functions