npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-image-orientation

v1.0.1

Published

An n8n node that uses Tesseract.JS to determine the orientation of an image based on the text it contains.

Downloads

31

Readme

n8n-nodes-image-orientation

This repository contains the n8n community node Image Orientation.

The node uses Tesseract.js (OSD – Orientation and Script Detection) to analyze an image and detect how the text is oriented. You can then use n8n’s built-in Image node to rotate the image if needed.

Tesseract is an open-source OCR (Optical Character Recognition) engine that can recognize machine-printed text in images (e.g. PNG or JPEG) or in images embedded in PDF files.

n8n is a fair-code licensed workflow automation platform.



Installation

Follow the installation guide in the n8n community nodes documentation.

Compatibility

This node has been tested with n8n v1.119.2, but it should also work on newer and older versions.

Usage

Input

  • The node expects a binary image as input
  • The binary property name is configurable in the node settings (default: data).

Output

The node returns the Tesseract.js OSD output as JSON and always passes the binary data through unchanged.

Key output properties include:

  • orientation_degrees
    How many degrees the image would need to be rotated clockwise so that the text is upright.
    This value can be used directly in n8n’s Image node to rotate the image.

  • orientation_confidence
    How confident Tesseract is that the detected orientation is correct.
    You can use this in an IF node to avoid rotating images when the confidence is too low.

  • text_detected
    A boolean indicating whether Tesseract was able to detect enough text to determine an orientation.

    • true → Orientation values are considered valid.
    • false → Likely no text (or not enough text) was detected in the image.

Note: The input binary data is always forwarded to the output item unchanged.

Examples

Example #1 – Text detected, rotation required

The text is detected and the image should be rotated 270 degrees clockwise to be upright.

{
  "tesseract_script_id": 12,
  "script": "Latin",
  "script_confidence": 8.703704833984375,
  "orientation_degrees": 270,
  "orientation_confidence": 14.62347412109375,
  "text_detected": true
}

Example #2 – Text detected, no rotation required

The text is detected and the image is already correctly oriented (orientation_degrees is 0).

{
  "tesseract_script_id": 12,
  "script": "Latin",
  "script_confidence": 9.5,
  "orientation_degrees": 0,
  "orientation_confidence": 42.1,
  "text_detected": true
}

Example #3 – No text detected

Tesseract could not detect enough text to determine an orientation.
All OSD values are null and text_detected is false.

{
  "tesseract_script_id": null,
  "script": null,
  "script_confidence": null,
  "orientation_degrees": null,
  "orientation_confidence": null,
  "text_detected": false
}

Resources