add function: resizing the photo