Add window.onresize event handler.

Window resize can cause previously folded images to be visible (e.g. increase the width or height of the browser window), the lazy loading handler should be attached to this event as well.