PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

This node operation "Get Image Metadata" extracts metadata information from an image file. It supports multiple input methods for providing the image: as binary data from a previous node, as a base64 encoded string, or via a URL to the image file. The node processes the image and outputs its metadata in JSON format.

Common scenarios where this node is useful include:

  • Extracting technical details (e.g., dimensions, format) from images in automation workflows.
  • Validating image properties before further processing or storage.
  • Collecting metadata for cataloging or auditing image files.

Practical example:

  • A workflow receives images uploaded by users; this node extracts metadata such as width, height, and format to verify the image meets required specifications before continuing.

Properties

Name Meaning
Input Data Type Choose how to provide the image file to extract metadata from. Options: Binary Data, Base64 String, URL
Input Binary Field Name of the binary property containing the image file (used if Input Data Type is Binary Data)
Base64 Image Content Base64 encoded image content (used if Input Data Type is Base64 String)
Image URL URL to the image file to extract metadata from (used if Input Data Type is URL)
Output File Name Name for the output metadata file (e.g., "image_metadata.json")
Image Type Type of the image. Options: JPG, PNG
Async Enable asynchronous processing (true/false)

Output

The node outputs a JSON object containing the extracted metadata of the image. This metadata typically includes details such as image dimensions, format, color profile, and other relevant technical attributes depending on the image type.

If configured, the node can also output the metadata as a file with the specified output file name.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to the image data either as binary data from a previous node, a base64 encoded string, or a reachable URL.
  • No explicit external API keys or services are mentioned in the source code snippet.
  • The node relies on internal image processing libraries bundled within the node's implementation.

Troubleshooting

  • Common issues:

    • Providing an incorrect binary field name when using binary data input will cause the node to fail to find the image.
    • Invalid or unreachable URLs will result in errors fetching the image.
    • Malformed base64 strings will cause decoding failures.
    • Unsupported image types or corrupted image files may lead to incomplete or failed metadata extraction.
  • Error messages and resolutions:

    • "Binary property not found" — Verify the binary field name matches the actual binary property from the previous node.
    • "Failed to fetch image from URL" — Check the URL is correct and accessible from the n8n environment.
    • "Invalid base64 content" — Ensure the base64 string is properly encoded without extra characters or line breaks.
    • "Unsupported image format" — Confirm the image type matches one of the supported options (JPG or PNG).

Links and References

Discussion