rewind the photo file before trying to read it