added on resize event to adjust images when resizing window