New Community Node: Image Hasher – Automatic Perceptual Image Hashing

Hi everyone,

I’m excited to share my first community node with the n8n community – n8n-nodes-image-hasher – a tool for detecting duplicate or manipulated images using perceptual hashing (pHash).

What is pHash?

pHash, or perceptual hash, is a technique to generate a “fingerprint” of multimedia files that represents their content, not their exact data.

Unlike cryptographic hashes (which completely change with even a one-pixel edit), pHashes remain similar for visually similar content. This makes them useful for detecting near-duplicates or manipulated versions of the same image.

How it works:

  • Content Analysis: The algorithm analyzes perceptual features such as an image’s structure, colors, and patterns.

  • Feature Extraction: It extracts key visual features.

  • Hash Generation: A compact, fixed-length hash is generated based on these features.

Key characteristics:

  • Similarity-Based: Similar content produces similar hash values, even with small edits.

  • Not just for exact matches: Designed for visually alike content, not identical files.

  • Resilient to changes: Works even if images are resized, compressed, or slightly edited.

Applications of pHash:

  • Duplicate detection: Spotting near-duplicate images in large datasets

  • Content recognition: Identifying content across different formats

  • Copyright enforcement: Finding unauthorized copies of media

  • Digital forensics: Linking related data in investigations

  • Agricultural use cases: Detecting plant diseases via leaf image analysis

What does this node do?

The Image Hasher node brings pHash into your n8n workflows. You can:

  • Generate perceptual hashes for binary image data

  • Detect duplicates or manipulated versions of images

  • Automate content verification in workflows

  • Use it in pipelines for fraud prevention, dataset cleaning, or media processing

Key Features

  • Configurable hash size: 4, 8, 16, or 32 bits for speed vs precision

  • Works directly with binary image input from n8n nodes

  • Automatically handles temporary files

  • Graceful error handling for missing or invalid images

  • Easy integration into existing workflows

Installation

  1. Go to Settings → Community Nodes in your n8n instance.

  2. Click Install.

  3. In the NPM Package Name field, paste:

    n8n-nodes-image-hasher
    
  4. After installation, it will appear in your installed community nodes list. Search for Image Hasher and start using it.

Quick Example

Input: Binary image from an HTTP Request node
Operation: Generate 16-bit perceptual hash
Output:

  • {
    “hash”: “fc00fc00fc61fee0fce0eee4e30ce005f04df00c13fc03fc01d403fc0ffc03fc”,
    “algorithm”: “phash”,
    “size”: 16,
    “totalBits”: 256,
    “createdAt”: “2025-10-04T14:09:21.705Z”
    }

    hash: The perceptual hash value generated for the image

    algorithm: The algorithm used (phash)

    size: The hash size (default: 16)

    totalBits: Total number of bits in the hash (size * size)

    createdAt: Timestamp of when the hash was created.

2 Likes

Hi, I got error when I feed the binary from Google Drive. The error said “Mime type not found” I don’t know to fix it. Even I try add manually the mime type still got that error.

Hi Matt!
Thanks for trying out the Image Hasher node :raising_hands:

I tested the same setup (Google Drive → Image Hasher) and it works on my side. Since my node never throws “Mime type not found,” the issue is likely coming from another node earlier in your workflow.

To debug it, could you please share:

  • Your full workflow JSON (without credentials)

  • A screenshot of the node showing the red error

  • Your n8n version (Settings → About)

  • A screenshot of the binary data coming from Google Drive — especially whether it includes:
    mimeType, fileName, or fileExtension

Google Drive can sometimes output binary data without metadata, depending on the operation, node version, file type, or if “Binary Property Name” was changed.
If the Google Drive node doesn’t provide metadata, another node may fail before the Image Hasher even receives the file.

my workflow just simple like this: Download a file from Google Drive | n8n workflow template

n8n version: 1.119.2

file: https://drive.google.com/file/d/1xFhpfFNB-xl0tk-vXSBzyEVxOkOeTxKD/view