save photos to file rather than as binary data