updated image and compressed it