I have a query fetching a document which is an image. I want to assign the image to a field (URL).
I am doing:
Document doc = [select id, name,url, body from Document where name = 'image']; Object.URLFIELD__c = doc.url;
However the image is always broken. I set it available for external use.
Is there a good way to reference the image in visualforce?