Get image from fileupload

I'm creating a app to build smart cards to post on instagram.

The idea is simple: 1) insert a url; 2) get a open graph from url; 3) generate card from htmlcsstoimage.com.

Looks like this:

But in some cases, the open graph image is not ok or not exists. In this cases, i want to insert a file upload, like in image.

But how can i change the image to construct a query for htmlcsstoimage?

Some like a temporary upload, or in retool storage? How can i select what image is to use? Like a radio button or a select button: "open graph image" and "file upload image"?

Thanks!

Hi @igordisco,

Thanks for reaching out!

Do you already have the condition for when the open graph image is not ok or not exists? Something like image1.value ===""? If not, what is an example response from step 2 where the image is not usable?

Can you share a screenshot of your htmlcsstoimage query? The file upload components will provide you with the base64 of the image. Does the htmlcsstoimage accept data urls?