Added automatic resizing of images BEFORE they're fully loaded