reset the ratio of the image on resize

If the image source of a backstretches image is changed, the image will
be skewed. This recalculates the image ratio on each resize.