Add update function for window after change image src