When i transform my image frome data url to png it is empty

so idk how to fix that there is more information and last topic i asked how to transform it

1 Like

Hi @mozik

You can use this n8n expression for the Base64 Input file(s)

{{ $json.choices[0].message.images[0].image_url.url.split(',').pop() }}

Why this works:

  • .split(','): This breaks the string into two parts at the comma.

    • Part 1: data:image/png;base64

    • Part 2: The actual Base64 code.

  • .pop(): This grabs the last element of that split (the Base64 string), which is exactly what you need for most image processing nodes.

hope this helps.