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
mark.siroismark.sirois 

externally available images not visible in sites pages

I have 4 sites pages in which i reference documents (in a shared folder to all users) stored as externally available images. when viewing the sites pages from the url no image is displayed. when viewing from inside the app the images appear. I have done this previously and had no problems. any ideas are welcome.

mark.siroismark.sirois

not sure why it wasn't working when i had called the url the same way successfully before, but i resolved it by explicitly calling the entire url as in:

https://c.na1.content.force.com/servlet/servlet.FileDownload?file=01530000001Igux

 

previously i had started with /servlet/servlet...

 

weird.

Shashikant SharmaShashikant Sharma

make sure sharing is public for the images, sites only can use public components.

bob_buzzardbob_buzzard

There has been talk of things being split out between the content.force.com and visual.force.com servers going forward - it may be as simple as something switched over recently.  Or it could be something that's been broken in Summer 11!

Rajkumar VenkatRajkumar Venkat

 To include the Image/logo in external sites or in emailtemplate, you have to create a document and use the following syntax to refer in your EmailTemplate/VF component. (The image should be externally visible as the user should be view the image if he hasn't logged into Salesforce system also). 
string documentId= [SELECT Name,ID FROM Document where DeveloperName=:yourDocumentName].id; 
string PublicUrl= URL.getSalesforceBaseUrl().toExternalForm()/servlet/servlet.ImageServer?id={!document.id}&oid=UserInfo.getOrganizationId();