Update resize

Updated the resize function for photos