New Gemini 2.0 Flash not analsing image

I was trying to analyze the image using Gemini 2.0 flash and using Basic LLM chain node
and was following below docs for OpenAI compatilbilty

Note: as per docs google gemini 2.0 flash do not accept image urls. so you have to convert image to base64

in image url .I am passing

data:image/jpeg;base64,${base64_image}

Describe the problem/error/question

after running the node it say “This model does not support images”.

and I also tried the http request and works fine.

What is the error message (if any)?

Please share your workflow

Information on your n8n setup

Debug info

core

  • n8nVersion: 1.72.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8nVersion: 1.72.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1

this has been fixed in v 1.78

Hey @Vikas_Kumar - maybe you found a solution. But wanted to share two ways that worked for me:

  1. Use Agent Node with option “Automatically Passthrough Binary Images”
  1. Use HTTP Node
1 Like

what if i want to send multiple images into the Gemini 2.o flash http node. how do I achieve that

Hey @sinchana - you can just build a loop around it :slight_smile:

1 Like

I am using the second method where I am sending over the looped images to call gemini http node but for some reason it doesnt seem to work.

Ah, well, in that case you can just use the “native” n8n way to process multiple items

How does this work for multiple images? Since the base64 has to be passed into gemini node. I can’t pass multiple Images at a same time into it

Yeah, well, it will run for each base64 and give you one output per image. So the HTTP node will run once for each item. Is it essential for the context that you do it in one request? I am not sure if that’s possible, would have to check Gemini docs.

Probably import the example from me and run through it to see what the output will be.

@sinchana did that help ?

I took a different approach—I converted the images into a list, encoded them as a Base64 string, and fed them into Gemini. This worked for me.

1 Like

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