ExifData icon

ExifData

Read and Write EXIF Data from and to Image Files

Overview

This node allows users to interact with image files' EXIF metadata using the ExifTool utility. It supports reading, writing, repairing, deleting, and sending custom commands to manipulate EXIF data embedded in various image formats such as JPG, PNG, HEIC, TIFF, GIF, BMP, WEBP, and JPEG.

Common scenarios include:

  • Extracting metadata like camera settings, geolocation, or timestamps from photos.
  • Adding or modifying metadata tags for organizing or copyright purposes.
  • Repairing corrupted EXIF data to restore file integrity.
  • Removing sensitive metadata before sharing images.
  • Running advanced custom ExifTool commands for specialized metadata operations.

Practical example:

  • A photographer wants to batch update the copyright tag on multiple images before publishing them online.
  • A digital archivist needs to extract raw EXIF data from historical images for cataloging.
  • A user wants to remove all location data from photos to protect privacy.

Properties

Name Meaning
Property Name Name of the binary property containing the image data (e.g., "data").
Output Property Name Name of the JSON property where the EXIF data or command result will be stored (e.g., "exifData").
Custom Exiftool Command Custom parameters to send to ExifTool; the image file is automatically appended as the last parameter.
Options: Collection of options:
- Read Raw Boolean flag to return raw, untransformed, and unstandardized EXIF data when reading.
- Parse Input Fields Boolean flag to parse input fields like "Keywords" or "Subject" as comma-separated lists when writing.

Output

The node outputs JSON data under the specified output property name containing the results of the EXIF operation:

  • For Read operations: The EXIF metadata extracted from the image, either parsed or raw depending on the option.
  • For Write operations: An array of results for each metadata tag written, including confirmation and tag names.
  • For Delete operations: Result object indicating which tags were deleted or retained.
  • For Repair operations: A success indicator confirming the repair process.
  • For Custom Command operations: The raw or parsed output from the custom ExifTool command.

If the node processes binary data, it updates the original binary property with the potentially modified image file after the EXIF operation.

Dependencies

  • Requires the exiftool-vendored package to interface with the ExifTool CLI.
  • Needs access to the n8n storage path for temporary file handling.
  • Supports common image file extensions: jpg, png, heic, heif, tiff, gif, bmp, webp, jpeg.
  • No direct external API keys are required, but the environment must allow file system read/write operations.

Troubleshooting

  • Storage Path Missing: If the node cannot find or create the storage directory, it throws an error suggesting manual creation of the directory.
  • Unsupported File Extension: Files with unsupported extensions cause an error; ensure input files have supported image formats.
  • No File Data Provided: If the binary property does not contain data, the node errors out.
  • No Metadata Values for Write: Writing without any metadata values configured triggers an error.
  • Custom Command Write Not Supported: Attempting to use write operations via custom commands throws an error; use the dedicated write operation instead.
  • Temporary File Conflicts: If a temporary file exists from a previous operation, the node logs a message and waits to avoid conflicts.
  • Cleanup Failures: Errors during cleanup of temporary files are logged but do not stop execution unless critical.

To resolve issues:

  • Verify the binary property contains valid image data.
  • Confirm the storage path exists and is writable.
  • Use supported file types.
  • Provide necessary metadata for write operations.
  • Avoid unsupported custom command usages.

Links and References

Discussion