0

I store some of my photos on a web server, and I'd like to be able to read the metadata with ExifTool.

Is it possible to use ExifTool to connect to files that are otherwise accessible online via common internet protocols, e.g., http://, ftp://, etc.?

For example, I tried the following command:

exiftool -all https://i.stack.imgur.com/kNrnd.jpg

It returned "file not found."

6

ExifTool has no built in ability to access online files. However, as shown in the example under Piping Examples, you can pipe the file from a program — such as cURL — to get the metadata of a file.

  • 1
    Yes, that example works! Using curl -s https://i.stack.imgur.com/kNrnd.jpg | exiftool -fast - returns 60+ tags. – EJ Mak Aug 13 '18 at 4:19
  • Of course, it's worth being explicit that the entire file gets downloaded. – osullic Aug 13 '18 at 19:59
  • @osullic Will you elaborate? – EJ Mak Aug 13 '18 at 20:30
  • @EJMak I just mean that cURL will download the file in its entirety, and then exiftool will do its analysis. It's just worth keeping in mind in case, perhaps, someone wants to do this as a batch operation on gigabytes of remote images. Some naive user might think that exiftool somehow just sniffs the metadata remotely, without downloading the full file to the local machine. – osullic Aug 14 '18 at 0:32
  • @osullic The -fast option in the exiftool example means that "ExifTool will not scan to the end of a JPEG image to check for an AFCP or PreviewImage trailer, or past the first comment in GIF images or the audio/video data in WAV/AVI files to search for additional metadata." Once exiftool reaches that point, it will close the stream, which appears to shut down curl. You can compare outputs by adding -verbose to the curl command and checking against a large file such as this wikimedia file – StarGeek Aug 14 '18 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.