How to upload an image into my build project?

Hi,

I can not seem to find out how to get an image to display in even a simple page in AI Studio.

I have tried:

  • Attach the image to a prompt: Display the attached image in an HTML page.
  • Upload the image to the repo and prompt: Display the image named xxx in the repo in an HTML page.

I’m clueless on how to perform such a simple task.

Thanks.

Hi @raoul , Welcome to forum!!!

Thank you for reaching out. Please make sure the image file is located correctly relative to your HTML file, and that it is in a publicly accessible location if you are serving the HTML outside the repository.

@Nireeksha_K_A Thanks for your quick reply.

Whatever I try I can not show an image, I am just starting with the preview tool. Here is a screenshot.

I can only attach one pic but it shows as a broken link

@Nireeksha_K_A Any ideas?

I second this! Ai studio definitely struggles with displaying images, at least in my experience

I provided a link of an image for my app, and Gemini wrote in the code, but I ended up having to manually change the name of the link from the way it formatted the link in the code, and that ended up working instead for some reason.

Hi @raoul ,

Thanks for sharing the screenshot. Could you please try renaming the file to remove any spaces(for example: ‘%20’) and let me know if the issue still occurs?

Thanks

Hi @Nireeksha_K_A ,

I renamed the file, it does nto help. I have tried uploading it with a prompt or upload it into the code but no way it will display the simple image.