function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pruthvi KrishnaPruthvi Krishna 

problem with displaying image

I ahve an image controller class and it is pointing to an image in the Documnets object. I have used in "Aboutus" page and the peview displays the image fine. However, I have set the "Aboutus" page as default home page to one of my "Site" and noe only the text appears and the image appears as broken.

Need help.
pbattissonpbattisson
You need to ensure that the image is marked as "Externally Available Image" (i.e. the checkbox is checked) and that the folder in which the image is stored is made visible to the Sites Guest User.
Pruthvi KrishnaPruthvi Krishna
Checkbox is checked and the folder in which the image is stored is available to all users. Still I get this problem
pbattissonpbattisson
When you say all users - this means the Sites Guest User as well - from my recollection this needs a group adding them. Have you validated they have the read permission on Document as well.
Pruthvi KrishnaPruthvi Krishna
I have added the Guest User as well and I have granted Read/Write
pbattissonpbattisson
Can you post your code up so we can review it? Also please show the page code (inspect source) for the image element on the sites page when viewing it.
Pruthvi KrishnaPruthvi Krishna
  User-added image

If you notice the highlited area in red, you can see a broken image.And the inspect element is pointing to the image but says "couldn't load image". 
pbattissonpbattisson
This is definitely a permissions issue as stated previously can you do the following and check the permissions again:
  • Your Name | Setup | Manage Users | Public Groups
  • Create Group
  • Add Default Site Guest User to This group
  • Goto Documents.
  • Edit the Folder that your document is assigned to
  • In the section: This folder is accessible only by the following users, move your new Public Group in the Shared To Column