Hello, I am trying to embed a PNG image from a Cloud Storage bucket into an email using cloud functions. My problem is that the image shows a broken link once the email is received. However, if instead of sourcing the image from Cloud Storage I use URLs from Imgbb, the image shows correctly. This is how I’m adding the URL in the html body:
email_with_image = f'<img src="{image_url}"/><br>{content}'
image_url is good because if I print the resulting URL and paste it in the browser it shows me the image.
The bucket containing my images is publicly available, where allUsers have permissions for Storage Object Viewer.
What can I be possibly doing wrong? I’ve tried many different options, but it is just not working.
I appreciate your help, thank you.
Hi @Jterzaga,
Welcome to the Google Cloud Community!
You can try the following troubleshooting options:
Let me know if it helped, thanks!