Skip to content
Matthew McEachen edited this page Aug 5, 2021 · 6 revisions

Where do you get your tag entries from?

Tags.ts is created by the npm mktags script. The samples I've run it against come from a cached copy of ExifTool's samples. These files have all the metadata of the original files, but the images or videos are replaced with a 1x1 pixel image.

Please note: only the tags found in these ~6k of images are included in Tags.ts.

If you find that you're missing tags, feel free to submit a pull request that adds a tags-only* file to the examples directory, and I can rebuild the tags file, including the new tags.

* By "tags-only", I ask that you strip the file of content other than the metadata headers, if that's possible, in the interests of keeping the source tree reasonably small. See other test images for examples.

I'd like to run ExifTool on all the files in a directory hierarchy

Before you embark on this journey, make sure you've read ExifTool's Fine Documentation, especially item #3 on this page. What you want done could very well be a (short!) single exiftool command.

See this conversation for more details.

How do you make this work with electron?

Electron is notoriously brittle and buggy, and is not officially supported by this package. Although PhotoStructure uses this package within electron, there's a nontrivial amount of auxiliary support code specific to that project to make it work smoothly.

If you're still anxious to try, here are some things to keep in mind:

  1. Note that this package will spawn exiftool external processes, which means the exiftool-vendored.pl and exiftool-vendored.exe packages should be included in your asarUnpack. SmartUnpack will not work. Use a pattern like node_modules/exiftool-vendored.*/**/*.

  2. This is a backend module. Using exiftool-vendored from within a webview won't work.

  3. __dirname at runtime from within an asar package after webpacking will be invalid, so don't rely on that.

See #17 and #47 for more context.

I've got a webpack error

As with all native modules, make sure you add node_modules/exiftool-vendored.* to your externals. See webpack-node-externals.

I want to use this package with AWS Lambda

Apologies, but AWS Lambda isn't supported. See these threads for more context:

https://github.com/photostructure/exiftool-vendored.js/issues/69#issuecomment-562717252

https://github.com/photostructure/exiftool-vendored.js/issues/53

How do I use an ExifTool config file?

Update your exiftoolArgs.