Increase your karma rate by helping :) The best practice with picture prompt

I Hi n8n community! :waving_hand:

I’m building a workflow where I need to process images for AI generation, and I’m looking for the best practice to handle this scenario:

Current Setup:

  1. Webhook receives multiple image files (PNG/JPEG) as binary data

  2. Need to process these images through Replicate API (or similar AI services)

  3. Problem: Replicate requires image URLs in the prompt, not base64/binary data

My Workflow:

Webhook (receives images) → ??? → Replicate API (needs URLs) → Output

Question:

What’s the best practice in n8n for converting webhook binary images to publicly accessible URLs?

Hi. For a similar case, I would definitely use S3 object storage like AWS or Cloudflare R2, or a budget-friendly option you can self-host like MinIO to store binary data. Then, I’d use the static URL or a pre-signed URL from the S3 object feature for automation needs. Is there any other reason you don’t want to store the image as binary data?

So, there is no any other options besides hosting, isn’t it?)

What Replicate model are you using? As far as I know, Replicate can upload binary data directly via Base64. Input files - Replicate docs

This one. I have a case where I need to combine multiple images. Let’s say I have a picture of my product and I need to show it in hand. So, for that reason, I choose the combine function of FLUX, because it works close to perfect (except for the text on the product). But if you have other better options for this use case, please let me know :slight_smile: Maybe we dont need to combine, but instead just put the product photo and do the rest by a prompt (“Photorealistic medium shot of a fit athletic woman confidently holding smth…”)

So, for that case we need to convert our file to webp first?

For a similar case I’ve handled, I prefer the GPT IMAGE model from ChatGPT because the results are far better. Alternatively, you could try using “JSON PROMPT” on Replicate for more precise results.

This is the exact same use case for social media brand awareness, where I had to use product insights from the client for the captions and the product reference context to create the JSON prompt.

1 Like

You can convert it using this node but you need merge your images if it have more than 1 input

2 Likes

Got u! Thanks a lot!

you can use google drive for that make a folder public then upload to that folder.

you will get

1 Like

Thank you! Will test it out too