Fix image resize when viewer opened first time when image dock is invisible