How to enable the Edit Image node on N8N desktop

A few days ago I discovered that there is a node to edit and generate images within a workflow without resorting to third-party APIs. This node is intentionally disabled on the desktop version because it relies on an external program called GraphicsMagick.

Here are the steps required to install GraphicsMagick and enable the Edit Image node:

  1. Download the latest version (currently 1.3.36) available at: GraphicsMagick - Browse /graphicsmagick-binaries at SourceForge.net (for most users the installer with the name ending in “Q8-win64-dll” is appropriate)

  2. Run the installer, making sure that the option to update the PATH environment variable is activated, this is necessary so that n8n can later find the installed program.

  3. Before continuing, I recommend testing if the program is installed correctly, to do this open a command prompt (Win+R, write “cmd”, press ENTER) and once inside write the command “gm” (without the quotes) and press ENTER, the result should be something like this:

If instead an error dialog appears with a message like "The application was unable to start correctly (0xc0150002)" then it will be necessary to install Visual Studio 2008 Redist, it can be found on the following page: Latest supported Visual C++ Redistributable downloads | Microsoft Docs
Scroll down to the “Visual Studio 2008 (VC++ 9.0) SP1 (no longer supported)” section and download the installer “vcredist_x64.exe”. Install that.

  1. Now that GraphicsMagick is correctly installed, the only thing left is to activate it in the n8n installation, for this you have to edit the following file: %LocalAppData%\Programs\n8n\resources\app\node_modules\n8n-nodes-base\package.json (make sure to make a backup of the file before editing it)
    Inside the file locate the list of nodes, it can be identified because they are strings that start with "dist/nodes/...", add a new element at the end of this list with the following value: "dist/nodes/EditImage/EditImage.node.js" (making sure to separate this new element from the previous one with a comma), it should look like this:
    notepad++_M5uYzmuXOA
    Save the changes and restart n8n.

  2. You should now be able to use your new Edit Image node.

4 Likes

Welcome to the community @jamesb and thanks a lot for sharing this!

1 Like