Fix auto-height feature on image resize.