resizes image after loading