Fix auto-height feature on image resize.

Fixes #50