properly resizing the image to post as well as proper orientation