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 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-textintoimage

v1.0.1

Published

n8n node to generate HDR-quality motivation images from text — perfect for Instagram posts

Readme

n8n-nodes-text-to-image

Generate beautiful, HDR-quality motivation images from text — directly inside your n8n workflows. Perfect for automated Instagram posts.

Node Icon


Features

  • 6 built-in templates — dark minimal, light elegant, vibrant purple, golden hour, arctic clean, midnight blue
  • Full custom mode — control every visual parameter
  • Multi-line text — use \n in your text input
  • Batch generation — generate many images at once from a JSON array
  • HDR output — renders internally at 2× resolution for crisp Retina/HDR screens
  • Effects — vignette, film grain, gradient backgrounds
  • Output formats — PNG (lossless) or JPEG (adjustable quality)
  • Bundled fonts — Inter, Playfair Display, Oswald, Montserrat (no internet required)

Prerequisites

Important: node-canvas requires native system libraries (Cairo, Pango, libjpeg). This node works on self-hosted n8n only. See Docker section below.

macOS (local dev)

brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman

Ubuntu/Debian

sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

Docker

See Dockerfile.example in this repo for a ready-to-use setup.


Installation

Option 1: Local ~/.n8n/custom/ (Self-hosted)

# 1. Clone and build
git clone <this-repo>
cd n8n-nodes-text-to-image
npm install
npm run build

# 2. Download bundled fonts (see Fonts section below)
npm run download-fonts

# 3. Copy to n8n custom nodes directory
mkdir -p ~/.n8n/custom/node_modules/n8n-nodes-text-to-image
cp -r dist package.json ~/.n8n/custom/node_modules/n8n-nodes-text-to-image/

# 4. Restart n8n
n8n start

Option 2: Docker (Local)

See Dockerfile.example. Build it with:

docker build -f Dockerfile.example -t n8n-custom .
docker run -it --rm -p 5678:5678 n8n-custom

Option 3: Heroku ☁️

See HEROKU.md for the complete guide including:

  • Option A — Heroku Container Registry (Docker) ✅ Recommended
  • Option B — Heroku Buildpacks + Aptfile

Quick start:

heroku create your-n8n-app
heroku container:login
heroku container:push web -a your-n8n-app --dockerfile Dockerfile.heroku
heroku container:release web -a your-n8n-app

Fonts

This node bundles the following fonts (placed in nodes/TextToImage/fonts/):

| Font | Variants | Style | |------|----------|-------| | Inter | Regular, Bold | Modern, clean | | Playfair Display | Regular, Bold, Italic | Elegant, serif | | Oswald | Regular, Bold | Condensed, strong | | Montserrat | Regular, Bold | Geometric, versatile |

Downloading fonts:

npm run download-fonts

This script fetches .ttf files from Google Fonts and places them in the correct directory.


Usage

1. Single Image

  1. Add the Text to Image node to your workflow
  2. Pick a Template (or select Custom)
  3. Type your Text (use \n for line breaks)
  4. Adjust canvas size (default: 1080×1080 for Instagram square)
  5. Choose output format (PNG or JPEG)
  6. Connect the output to a Write Binary File, Google Drive, or HTTP Request node

2. Batch / Multiple Images

Enable Generate Multiple Images, then set the Text field to a JSON array:

["You are enough.", "Keep going.\nOne step at a time.", "Dream big. Start small."]

This produces one output item per string — each with its own binary image. Chain with a Loop Over Items node to post each to Instagram sequentially.


Templates

| Template | Background | Font | Best For | |----------|------------|------|----------| | ⚫ Dark Minimal | #0D0D0D solid | Inter Bold 72px white | Clean, modern | | 🤍 Light Elegant | #FAF7F0 solid | Playfair Display Italic 68px | Soft, luxury | | 💜 Vibrant Purple | #1A0533#6B21A8 gradient | Oswald Bold 80px white | Bold, energetic | | ✨ Golden Hour | #2C1A0E warm gradient | Playfair Display Bold 70px gold | Warm, inspirational | | 🩵 Arctic Clean | #F0F4F8 solid | Inter Regular 64px dark | Professional, minimal | | 🌑 Midnight Blue | #0F172A gradient | Montserrat Bold 70px light | Night, sophisticated |


Output

Each item in the output contains:

JSON fields: | Field | Description | |-------|-------------| | fileName | e.g. image_1.png | | width | Canvas width in px | | height | Canvas height in px | | template | Template name used | | text | Text that was rendered | | outputFormat | png or jpeg | | index | 0-based index (batch mode) |

Binary field (default name: image): The generated image binary — connect directly to any n8n node that accepts binary data.


Example Workflow

[Manual Trigger]
      ↓
[Text to Image] — Template: Golden Hour, Text: "Be the change."
      ↓
[Write Binary File] — path: /output/motivation.png

Or for Instagram automation:

[Schedule Trigger]
      ↓
[Text to Image] — Batch mode, 7 quotes for the week
      ↓
[Loop Over Items]
      ↓
[HTTP Request] — POST to Instagram Graph API

License

MIT