You need to sign in to do that
Don't have an account?

Showing an image on a public portal
Hello
I have a case where I have a public portal VF page and I want to show an image on this page.
Initially I wanted to use the Attachment object (I attached the image to the object showing on the page) but when I did that I got an unauthorized access error, which I assumed is because the Attachment object is not accessible to a Guest user.
Same think happened if I use the Document object to store the image.
Can someone advise what is the right way to achieve this apart from using a Static Resource?
Many thanks
Oded
Did you checked the 'Externally Available Image' checkbox for the document you put into 'Documents'?
Yes.
Maybe I'm using the wrong way to access it:
maybe accessing the file from a public page requires a different link?
Thanks
Oded
I have URL like this on a sample image I uploaded.
https://c.na12.content.force.com/servlet/servlet.ImageServer?id=015U0000000LcTp&oid=00DU0000000HOC3&lastMod=1312657393000
You can try one alternative here
Add the image in Static resource and set Cache Control of resource as public and then use that imgae.
Thank you but I prefer not using a Static Resource.
I was finally able to make the Document show.
Thank you all
I would suggest you to explain what was the issue when you and how you fixed it. It will help others when they will get stuck in same issue.
Sure;
The permissions on the Document object were not configured correctly.
On this note, does anyone know if I can create a preview of the image located as a Doc object using a Formula and the IMAGE function, like I do with Static Resources?
Thanks
Oded