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
LWILWI 

Images from rich text field not being displayed on force.com sites or PDF visualforce page

We have images displayed from rich text fields onto force.com sites and PDF visualforce pages. These were working but recently have been returning 'Image not available' errors. What is causing this change in behavior? We haven't changed anything directly related.
NagendraNagendra (Salesforce Developers) 
Hi,

1) Where are the images stored in the instance (which object), and can they be accessed from anywhere else but the RTA field itself?

2) Is there any way to reference the URL of the image in a specific format so that the Site can access it (If an object needs permissions for the site profile, which object would that be)?


Are you sure the rich text field is visible to the site profile? It's not included in the regular list, you have to go to the site settings and access the profile from there where you can then check whether the field level security is good. Have you tried using straight tags instead of using the Visualforce image tag?

We use rich text fields for our website and that displays images from the same server without problems; the image below is accessed via this URL: It also depends on how the image is added to the RTA field. For example, if the image is added from a "document" record, we should ensure that the document record is externally accessible. We should ensure that the document record has "Internal Use Only" unchecked and "Externally Available Image" checked.

Still, if the problem persists give a try by clearing the cache which might help you.

Hope this helps.

Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering similar issue.

Thanks,
Nagendra.
LWILWI
The images are stored directly in the field. Permissions are good. The images show in the UI and when accessed through the internal url, but external urls aren't working:

http://globtek.force.com/servlet/rtaImage?eid=a0Oa000000MmW10&feoid=00Na0000009q686&refid=0EMa0000000EpJ9

 
LWILWI
The issue is that image urls are being output to the pdf as above. URLs with a site name eg

http://globtek.force.com/data/servlet/rtaImage?eid=a0Oa000000MmW10&feoid=00Na0000009q686&refid=0EMa0000000EpJ9
are working.

Please fix the img url output from rich text fields to the PDF renderer.