You need to sign in to do that
Don't have an account?
Display Externally Available Images on Sites Page
I'm trying to build an inventory catalog from some data stored in a custom object in Salesforce. One of the fields on the custom object stores the Id of a document that is an externally available image.
I'm trying to build this catalog in a Sites page and make this image appear. I'm currently doing this:
<apex:image url="/servlet/servlet.FileDownload?file={!Inventory__c.Image_URL__c}" />
This works fine when I'm logged into Salesforce and viewing the Visualforce page directly.
Once I navigate to the sites page and try to view it, nothing comes up. I'm confirmed that the image is externally available, and I've set the Sites profile to "Read" for Document objects.
Does anyone know how you actually take advantage of externally available images and make them VISIBLE externally?
I found the problem. The issue was that the folder in which the image was stored had restricted visibility. I created a group consisting of the Sites guest user and then added it to the folder visibility, now it works.
All Answers
the object
inventory__c
and the field
image_url__c
must be visible to the guest user or this will be blank in your sites page.
you can view the source of the sites page to see if this is the issue.
I found the problem. The issue was that the folder in which the image was stored had restricted visibility. I created a group consisting of the Sites guest user and then added it to the folder visibility, now it works.