resizing image to lower quality and size