403 Forbidden Error When Referencing Image from public Directory in Google AI Studio "Build" App

Hello everyone,

I’m currently developing a frontend component using React within the Google AI Studio “Build” application environment, and I’m encountering an issue loading a local image.

I am trying to display an image located at public/assets/icons/apps/message_icon.jpg in my project within a React component. The image reference path I’m using is ./public/assets/icons/apps/message_icon.jpg.

However, the image fails to display in the preview page. Upon checking the browser’s developer tools (Network tab), I see that the request for this image returns a 403 Forbidden error.

Are there any special static asset serving configurations, permission policies, or known limitations in this environment?Does the Build App support adding static image assets to a project and using them in code components?

Hi @Whitwelve_Vallily , Welcome to the forum.

I tried reproducing the issue you are facing by building a simple image viewer app in ‘Build’. While loading a local image, I ran into the same error.

Thanks for pointing this out, I will check in with the engineering team to investigate.