Converting image to base64

How do I get the data from the left node? No way I can do it with Binary node or Code node, they “can’t see” the previously downloaded image using http request > file

If there are other methods to generate base64 code from a url or file image then I’d be happy to learn.

Hey @JabmoBabo,

If you are after the binary data itself you can use a code node to get the data buffer then in the same node convert it to base64.

We have a handy docs page for getting the binary data in a code node here: Get the binary data buffer | n8n Docs We don’t have anything on the base64 conversion but I think there are other example on here for that side.

1 Like

So in short it is not possible without coding?
I thought move binary data node was just to move binary data to the next node.

Hey @JabmoBabo,

That is a good point, I just took a quick look at the Move Binary Data node again and it turns out it is possible, The workflow below seems to do the job. It looks like the trick is to unset the Set all Data option.

1 Like

Thanks! It works:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.