n8n - 💡(How to fix) Fix Edit Image Composite fails with "Stream yields empty buffer" [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#30430Fetched 2026-05-14 03:45:11
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×1labeled ×1mentioned ×1subscribed ×1

Error Message

n8n version

2.20.7-exp.0 (Self Hosted)

Stack trace

Error: Stream yields empty buffer at Socket.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/gm/lib/command.js:56:21) at Socket.emit (node:events:520:35) at endReadableNT (node:internal/streams/readable:1729:12) at processTicksAndRejections (node:internal/process/task_queues:90:21)

Code Example

n8n version

2.20.7-exp.0 (Self Hosted)

Stack trace

Error: Stream yields empty buffer at Socket.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/gm@1.25.1/node_modules/gm/lib/command.js:56:21) at Socket.emit (node:events:520:35) at endReadableNT (node:internal/streams/readable:1729:12) at processTicksAndRejections (node:internal/process/task_queues:90:21)
RAW_BUFFERClick to expand / collapse

Bug Description

Earlier tickets got closed without a solution: https://github.com/n8n-io/n8n/issues/30170

Since version 2.19.5 the "Edit Image" node fails to composite any two images with the error "Stream yields empty buffer"

Error details:

n8n version

2.20.7-exp.0 (Self Hosted)

Stack trace

Error: Stream yields empty buffer at Socket.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/gm/lib/command.js:56:21) at Socket.emit (node:events:520:35) at endReadableNT (node:internal/streams/readable:1729:12) at processTicksAndRejections (node:internal/process/task_queues:90:21)

To Reproduce

add two images (e.g. use Edit Image node to create them or use http request node to get images)

use "Edit Image" node with "composite" and run it.

or use this example flow: { "nodes": [ { "parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ 0, 0 ], "id": "31c41837-0184-4d36-a1b6-7f02502b1f40", "name": "When clicking ‘Execute workflow’" }, { "parameters": { "operation": "create", "width": 500, "height": 500, "options": {} }, "type": "n8n-nodes-base.editImage", "typeVersion": 1, "position": [ 208, 0 ], "id": "9864c415-446e-4925-bee4-e9fbee9055a5", "name": "Edit Image" }, { "parameters": { "operation": "composite", "dataPropertyNameComposite": "data2", "options": {} }, "type": "n8n-nodes-base.editImage", "typeVersion": 1, "position": [ 464, 256 ], "id": "5d6e1f96-1263-4b4d-b394-156c7315eb1f", "name": "Edit Image1" }, { "parameters": { "operation": "create", "dataPropertyName": "data2", "width": 500, "height": 500, "options": {} }, "type": "n8n-nodes-base.editImage", "typeVersion": 1, "position": [ 208, 256 ], "id": "859b9400-f1fd-49b1-ba43-90af09bd5953", "name": "Edit Image2" } ], "connections": { "When clicking ‘Execute workflow’": { "main": [ [ { "node": "Edit Image", "type": "main", "index": 0 } ] ] }, "Edit Image": { "main": [ [ { "node": "Edit Image2", "type": "main", "index": 0 } ] ] }, "Edit Image2": { "main": [ [ { "node": "Edit Image1", "type": "main", "index": 0 } ] ] } }, "pinData": {}, "meta": { "instanceId": "somedatahere" } }

Expected behavior

Like prior to 2.19 it should be able to compose one image over the other

Debug Info

Debug info

core

  • n8nVersion: 2.20.7-exp.0
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: postgres
  • executionMode: scaling (single-main)
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: c38732c2-8964-43cf-849d-bb489961b4e8

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: database

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 50000 executions

client

  • userAgent: mozilla/5.0 (x11; linux x86_64; rv:140.0) gecko/20100101 firefox/140.0
  • isTouchDevice: false

security

  • secureCookie: false

cluster

  • instanceCount: 3
  • versions: 2.20.7-exp.0
  • instances:
    • instanceKey: a5e6471b-78e7-44bb-8c7e-94e2c7200c3c, hostId: main-87adb711a53c, instanceType: main, instanceRole: leader, version: 2.20.7-exp.0
    • instanceKey: d7b27269-0438-4f9d-8907-7e4732a07226, hostId: webhook-5bf1602a511d, instanceType: webhook, instanceRole: unset, version: 2.20.7-exp.0
    • instanceKey: 35344a46-c978-4f49-b3ee-ea678b3a8bd6, hostId: worker-cbd6e5647511, instanceType: worker, instanceRole: unset, version: 2.20.7-exp.0
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-05-13T21:30:21.750Z

Operating System

Alpine

n8n Version

2.19.5 to 2.20.7-exp.0

Node.js Version

24.14.1

Database

PostgreSQL

Execution mode

main (default)

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Like prior to 2.19 it should be able to compose one image over the other

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING