I'm using Cloud Firestore (Database) and Cloud Storage (Image storage), but I'm not sure exactly how to display images.
Questions:
Process/Steps Taken:
"agency_logo": "gs://PROJECT_NAME_HERE.appspot.com/logos/CityLogo1.png",
AgencyCard
React component: // Render Logos
const renderLogos = () => {
return images.logos.map((logo, i) => (
<AgencyCard
key={i}
agencyName={logo.agency_name}
agencyLogo={logo.agency_logo}
/>
));
};
<div id="agency-image-container">
<img id="agency-image" src={props.agencyLogo} />
</div>
Browsers don't know how to load gs:// type URLs. That's a special URL used only by Cloud Storage for use only with other Google Cloud products. You will have to generate some sort of https download URL if you want to load it in a img tag. Consider a Firebase download URL or a Cloud Storage signed URL .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.