Hi,
Using a custom component to display html, which is working well, until I try to give it a retool storage image url for the header. when using the retool storage image url in the code, i dont get an image display - just "header image" which is the alt tag. (even after setting the image to public in retool storage):
if however, i pass in the url of an image freely available on the web, it displays perfectly:
any ideas as to why this might be?
Thanks.
Hi @dhretool
is the image flagged as public before upload to storage?
A custom component is outside the authenticated domain of an App, thus, if the image is not public, it won't be accessible by the component.
Hope this help.
1 Like
hi,
no. I set it to public inside of retool storage.
interesting. so the Custom Component inside of Retool, which contains the HTML, CSS and Javascript I'm using, can't use the url of an image kept in Retool Storage. Seems odd, but ok.
Thanks for the heads up.
Hi @dhretool
I did a quick test.
I was wrong. Even though the custom component is served from another domain (for security reasons), the image from Storage is served from the Retool domain, thus, if you're authenticated, the image is visible also from within a custom component.
I don't have issues replicating your case, though.
Hi again,
It's really strange. If I just pass the retool storage image url into an image component - works great - no issues. but trying it in a custom component, I just get the alt text. here's another example - just adding a simple header to the default custom component setup, with the retool storage url of the image from my first post:
It's always something small. I found the problem. There was a crossorigin='anonymous' statement in the custom component code. removing the anonymous portion of the code triggered the display of the retool storage image. thanks again.
2 Likes