fix issue 1922 - zooming images

Adapted to the refactored code.

resizing img now also based on its height.

issue 1922.