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

Displaying an attached image
Hello
I'm straggling with something I expected to be simple and I can use some help to figure it out.
I have an image as an attachment to a Campaign.
I have a VF page that should display this image but can't get it right.
I thought putting the Attachment ID in the image src parameter but this seems to be the wrong way.
Any advice on how this should be done?
Thanks
Oded
Hi,
Below code will display the image in Vf page, No need of putting any instance because it will automatically taken care and also in the file parameter replace with an attachment id
<apex:page>
<apex:image value="/servlet/servlet.FileDownload?file=00P90000000foOr"/>
</apex:page>
Thanks,
Arunraj
All Answers
You need to give folowing URL in src.
https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=[Attachement ID]
replace c.ap1 with your name space.
Hi,
Below code will display the image in Vf page, No need of putting any instance because it will automatically taken care and also in the file parameter replace with an attachment id
<apex:page>
<apex:image value="/servlet/servlet.FileDownload?file=00P90000000foOr"/>
</apex:page>
Thanks,
Arunraj
Thanks guys