resized image to maximum 500 each