resize the image to 500px