How can I display an image which is stored in files?
For attachments I can use the code below, but it doen't work for files.
<apex:image id="Stat1" URL="/servlet/servlet.FileDownload?file=0698E0000008w5e" width="15" height="15"/>
Try this format
How to get the DOWNLOADID?
Open the File, you will get a screen as below. Hover on the download link, you will get the DOWNLOADID as highlighted. Replace [DOWNLOADID] with the ID of the ContentVersion record you want to display.
VF Page :
<apex:page standardController="Account" > <apex:image url="/sfc/servlet.shepherd/version/download/0680H0000036GIH"/> </apex:page>
I've tried the solutions above with no success after few tries managed to view the image stored on files in my lightning component with similar url:
/sfc/servlet.shepherd/document/download/<YOUR FILE ID>