# Transfer images between 2 node red install ( pi - windows )

**URL:** <https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458>\
**Category:** General\
**Created:** [8 October 2019 09:05 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458 "2019-10-08T09:05:32Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [8 October 2019 09:05 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/1 "2019-10-08T09:05:32Z")

</div>

Hi!

I am looking for some advice.  
I want to send an image from a windows pc to a pi both running node red.  
Now i think about ftp to do the transfer or send the data file trough mqtt but i guess that is not ideal

What should you advice to do this? and why so i learn from it 😉

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [8 October 2019 10:14 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/2 "2019-10-08T10:14:47Z")

</div>

You can use MQTT to send images (just tested it and it worked fine)

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [8 October 2019 10:22 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/3 "2019-10-08T10:22:31Z")

</div>

Depends how much and how often I guess. How large are the images, and at what frequency would you like to send it?

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [8 October 2019 11:12 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/4 "2019-10-08T11:12:09Z")

</div>

I send still images from Pi cameras using MQTT, which works well, though I agree MQTT is not an _ideal_ channel for this. I push the raw image data through a [Base-64 encode node](https://flows.nodered.org/node/node-red-node-base64) before transmission which allows them to be directly displayed on a dashboard on the receiving end with a simple template node. Been doing it this way for a couple of years without any issues.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [8 October 2019 12:28 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/5 "2019-10-08T12:28:37Z")

</div>

serious? thats cool. Thought it would be to much for mqtt

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [8 October 2019 12:29 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/6 "2019-10-08T12:29:34Z")

</div>

Cool i am going to test it, thanks

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 October 2019 15:45 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/7 "2019-10-08T15:45:21Z")

</div>

> The payload of the message is limited to 268,435,456 bytes. this is defined by the spec.

No problem unless you have some serious imagery 😉

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [27 March 2021 08:49 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/8 "2021-03-27T08:49:54Z")

</div>

can I get the flow of it?? I'm sending an image with base-64 encode but on receiving the same using base64 not able to get the image.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 March 2021 08:54 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/9 "2021-03-27T08:54:32Z")

</div>

> [@pranavthakkar](#):
>
> not able to get the image.

What does that mean? The data doesn't arrive at the MQTT broker? The data doesn't arrive in the 2nd node-red? The data arrives but you can't display it in dashboard?

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [27 March 2021 08:58 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/10 "2021-03-27T08:58:47Z")

</div>

I can get the data, Data from both MQTT send and receive have base64 node. At this moment I got the image successfully in the image preview node.

Now I'm not able to see it in the dashboard. I have used a template node for that. but not able to see the image

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87baf32484a6eebcec5f3b3d4d83286028d2817c.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/f/ef2b831a59f588d61ae3aee8ee5e37f814f5b2d8.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 March 2021 09:21 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/11 "2021-03-27T09:21:33Z")

</div>

Thats probably something simple. See the flow in [this post](https://discourse.nodered.org/t/display-image-using-template-node/43094/6), grab the template and ui\_template from that.

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [3 April 2021 12:40 UTC](https://discourse.nodered.org/t/transfer-images-between-2-node-red-install-pi-windows/16458/12 "2021-04-03T12:40:02Z")

</div>

> [@pranavthakkar](#):
>
> can I get the flow of it?

Sure!

```auto
[
    {
        "id": "c6dd49c3.81e468",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "9e351bee.6ede18",
        "type": "ui_template",
        "z": "c6dd49c3.81e468",
        "group": "aff659f4.4b64b",
        "name": "Camera 1",
        "order": 2,
        "width": "6",
        "height": "4",
        "format": "<img src=\"data:image/jpg;base64,{{msg.payload}}\" style=\"display: block; width: 100%;\" />",
        "storeOutMessages": true,
        "fwdInMessages": false,
        "resendOnRefresh": false,
        "templateScope": "local",
        "x": 240,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "b28e5d43.133d3",
        "type": "mqtt in",
        "z": "c6dd49c3.81e468",
        "name": "Camera 1",
        "topic": "cameras/1/capture",
        "qos": "2",
        "datatype": "auto",
        "broker": "e929bd47.f54968",
        "x": 80,
        "y": 120,
        "wires": [
            [
                "9e351bee.6ede18"
            ]
        ]
    },
    {
        "id": "79168c78.2df8e4",
        "type": "camerapi-takephoto",
        "z": "c6dd49c3.81e468",
        "filemode": "0",
        "filename": "",
        "filedefpath": "1",
        "filepath": "",
        "fileformat": "jpeg",
        "resolution": "2",
        "rotation": "180",
        "fliph": "0",
        "flipv": "0",
        "brightness": "50",
        "contrast": "0",
        "sharpness": "0",
        "quality": "",
        "imageeffect": "none",
        "exposuremode": "auto",
        "iso": "0",
        "agcwait": "1",
        "awb": "auto",
        "name": "Action",
        "x": 230,
        "y": 60,
        "wires": [
            [
                "2eb733dd.94a95c"
            ]
        ]
    },
    {
        "id": "2eb733dd.94a95c",
        "type": "base64",
        "z": "c6dd49c3.81e468",
        "name": "",
        "x": 380,
        "y": 60,
        "wires": [
            [
                "a0c49073.a2b71"
            ]
        ]
    },
    {
        "id": "a0c49073.a2b71",
        "type": "mqtt out",
        "z": "c6dd49c3.81e468",
        "name": "MQTT",
        "topic": "",
        "qos": "",
        "retain": "",
        "broker": "e929bd47.f54968",
        "x": 530,
        "y": 60,
        "wires": []
    },
    {
        "id": "2568cc5e.548584",
        "type": "inject",
        "z": "c6dd49c3.81e468",
        "name": "Capture",
        "props": [
            {
                "p": "timestamp",
                "v": "",
                "vt": "date"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "cameras/1/capture",
        "payloadType": "str",
        "x": 90,
        "y": 60,
        "wires": [
            [
                "79168c78.2df8e4"
            ]
        ]
    },
    {
        "id": "aff659f4.4b64b",
        "type": "ui_group",
        "z": "",
        "name": "Default",
        "tab": "bcbe7bf2.cf94c8",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "e929bd47.f54968",
        "type": "mqtt-broker",
        "z": "",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "bcbe7bf2.cf94c8",
        "type": "ui_tab",
        "z": "",
        "name": "Examples",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

```
