Package Information
Downloads: 43 weekly / 53 monthly
Latest Version: 0.1.0
Author: Martin Mundschenk
Available Nodes
Documentation
n8n-nodes-imagemagick
n8n Custom Node für die Integration des ImageMagick Processing Service in n8n Workflows.
🎯 Features
- ✅ 8 Bildverarbeitungsoperationen: Resize, Rotate, Crop, Grayscale, Thumbnail, Convert, Quality, Blur
- ✅ Binary Data Support: Nahtlose Integration in n8n Binary Data Pipeline
- ✅ URL Download: Lade Bilder direkt von URLs herunter
- ✅ Format-Konvertierung: Unterstützt JPG, PNG, WebP, GIF, BMP, TIFF, PDF
- ✅ Batch-Processing: Verarbeite multiple Bilder in einem Workflow
- ✅ Error Handling: Continue-on-Fail Support für robuste Workflows
📦 Installation
Voraussetzungen
ImageMagick Processing Service muss laufen:
cd /Users/martin/Entwicklung/imagemagick_api_service docker-compose up -d # oder python image_processing_service.pyStandard-URL:
http://localhost:8000n8n muss installiert sein:
npm install -g n8n
Node installieren
cd /Users/martin/Entwicklung/n8n/n8n-node-imagemagick_service
npm install
npm run build
In n8n laden
# Development Mode
npm run dev # Terminal 1: Auto-Build
./START_DEV.sh # Terminal 2: n8n mit Custom Node
Oder manuell:
export N8N_CUSTOM_EXTENSIONS="/Users/martin/Entwicklung/n8n/n8n-node-imagemagick_service"
n8n start
🚀 Verwendung
1. Credentials erstellen
- Öffne n8n:
http://localhost:5678 - Gehe zu Credentials → New
- Suche nach "ImageMagick Processing Service API"
- Gib die Base URL ein (Standard:
http://localhost:8000) - Teste die Verbindung mit Test Connection
2. Node verwenden
Beispiel 1: Bild verkleinern
HTTP Request (Download Bild)
↓
ImageMagick (Resize)
- Operation: Resize
- Input Source: Binary Data
- Width: 800
- Height: 600
- Output Format: jpg
↓
Write Binary File
Beispiel 2: PDF zu PNG konvertieren
Read Binary File (PDF)
↓
ImageMagick (Convert)
- Operation: Convert
- Input Source: Binary Data
- Output Format: png
- Density: 300
↓
Write Binary File
Beispiel 3: Thumbnail erstellen von URL
ImageMagick (Thumbnail)
- Operation: Thumbnail
- Input Source: URL
- File URL: https://example.com/image.jpg
- Size: 200
- Output Format: jpg
↓
Weitere Verarbeitung...
🛠️ Operationen
Resize - Größenänderung
- width: Neue Breite in Pixeln (optional)
- height: Neue Höhe in Pixeln (optional)
- outputFormat: Zielformat (optional)
- Mindestens width ODER height erforderlich
- Seitenverhältnis wird automatisch beibehalten
Rotate - Rotation
- angle: Rotationswinkel in Grad (Standard: 90)
- outputFormat: Zielformat (optional)
- Positiver Winkel = im Uhrzeigersinn
Crop - Zuschneiden
- width: Breite des Ausschnitts (erforderlich)
- height: Höhe des Ausschnitts (erforderlich)
- x: X-Position von links (Standard: 0)
- y: Y-Position von oben (Standard: 0)
- outputFormat: Zielformat (optional)
Grayscale - Graustufen
- outputFormat: Zielformat (optional)
- Konvertiert Farbbilder zu Schwarz-Weiß
Thumbnail - Vorschaubild
- size: Maximale Größe in Pixeln (Standard: 200, Range: 10-2000)
- outputFormat: Zielformat (optional)
- Seitenverhältnis wird beibehalten
Convert - Format-Konvertierung
- outputFormat: Zielformat (erforderlich)
- density: DPI für PDF-Konvertierung (72-600, optional)
- Unterstützt alle gängigen Formate
Quality - Qualitätsanpassung
- quality: Qualitätswert 1-100 (Standard: 85)
- outputFormat: Zielformat (optional)
- Reduziert Dateigröße bei kontrollierter Qualität
Blur - Weichzeichner
- radius: Stärke des Effekts 0-50 (Standard: 5)
- outputFormat: Zielformat (optional)
- Für künstlerische Effekte oder Anonymisierung
📚 Input/Output
Input Sources
Binary Data (Standard)
- Verwendet Binary Data vom vorherigen Node
- Binary Property: Name des Binary Properties (Standard: "data")
URL
- Lädt Datei von einer URL herunter
- File URL: Vollständige URL zur Datei
Output
- Gibt verarbeitetes Bild als Binary Data zurück
- Output Binary Property: Name des Output Properties (Standard: "data")
- Kann direkt an weitere Nodes weitergegeben werden
🧪 Testing
1. ImageMagick Service prüfen
curl http://localhost:8000/health
# Erwartete Antwort: {"status":"healthy","imagemagick":true}
2. Test-Workflow in n8n
- Start Node: Manual Trigger
- HTTP Request: Download ein Test-Bild
- ImageMagick: Resize auf 400x300
- Write Binary File: Speichere das Ergebnis
📋 Unterstützte Formate
Input
- Bilder: JPG, JPEG, PNG, GIF, BMP, TIFF, WebP
- Dokumente: PDF
Output
- Bilder: JPG, PNG, WebP, GIF, BMP, TIFF
- Dokumente: PDF
🔧 Development
Build
npm run build # Einmaliger Build
npm run dev # Watch Mode
npm run clean # Dist löschen
Linting
npm run lint # Code prüfen
npm run lint:fix # Automatische Korrekturen
Debugging
Aktiviere n8n Debugging:
export N8N_LOG_LEVEL=debug n8n startPrüfe Browser Console für Client-seitige Fehler
Prüfe Terminal für Server-seitige Fehler
🐛 Troubleshooting
Node erscheint nicht in n8n
# Cache löschen
rm -rf ~/.n8n/cache
# Build prüfen
ls -la dist/credentials/
ls -la dist/nodes/ImageMagick/
# n8n neu starten
"Connection failed" bei Credentials-Test
- Prüfe ob ImageMagick Service läuft:
curl http://localhost:8000/health - Prüfe Base URL in Credentials
- Prüfe Firewall/Port-Freigabe
"Binary Property does not exist"
- Stelle sicher, dass vorheriger Node Binary Data ausgibt
- Prüfe den Namen des Binary Properties
- Verwende "URL" als Input Source alternativ
API-Fehler
- Prüfe ImageMagick Service Logs
- Validiere Input-Parameter (z.B. mindestens width oder height bei resize)
- Prüfe unterstützte Formate
📄 Lizenz
MIT
👤 Autor
martin
🔗 Links
📝 Changelog
Version 0.1.0 (2026-01-08)
- ✨ Initial Release
- ✅ 8 Bildverarbeitungsoperationen implementiert
- ✅ Binary Data und URL Support
- ✅ Vollständige n8n Integration