ImageFigure: fix a bug that image got squished when its connection
changes from disconnected to connected.