Skip to content

Instantly share code, notes, and snippets.

@ca057
Last active July 9, 2025 23:42
Show Gist options
  • Select an option

  • Save ca057/b4dc3128234d03045ef8b881833e3da5 to your computer and use it in GitHub Desktop.

Select an option

Save ca057/b4dc3128234d03045ef8b881833e3da5 to your computer and use it in GitHub Desktop.
Extracting EXIF data into JSON

command line tools for working with images to json

Extract all exif data as list into a json file:

exiftool -j -q dir > data.json

Sort the exif data by the original creation time:

jq 'sort_by(.DateTimeOriginal)' data.json

Extract exif data and sort by original creation time:

exiftool -j -q *.jpg | jq 'sort_by(.DateTimeOriginal)' > data.json
@otonoton
Copy link

otonoton commented Jul 9, 2025

This seems to leave out a lot of information compared to using -all:all, even if you combine that with -j. For example with -j I only get a single TagName key, but with -all:all it shows 20 different tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment