4

I have been facing trouble in rendering image from Static Resource. Could any one help with the same?

The error is:

The linked image can not be displayed. The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location

The Static Resource is 'Public'

2

"public" means accessible from outside over an authenticated connection. So any request needs to include a session id (obtained by the login process) and a request originating from Excel will not have this.

You can provide unauthenticated access to a static resource by setting up a Site and using a URL that starts with the Site domain. Or you can provide access to the image by making it an externally available image Document which is simpler.

2
  • But I need to display the image on Excel sheet. So, I can not use Session ID. Is there any work around for this?
    – ipradhansk
    Apr 8 '14 at 9:50
  • @SanTosh Yes either of the mechanisms described in the second paragraph. The externally available Document is the simplest. Instead of using static resources upload the images as Documents and mark then as "externally available image" and use the URL shown in the linked documentation.
    – Keith C
    Apr 8 '14 at 9:53
0
<img src="https://c.xxX.content.force.com/servlet/servlet.ImageServer?id=documentId&oid=OrgId" width="132" height="65"/>

Replace xxX with serverId

Upload image as document with public access and externally available. use this url format to display in VFPage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.