You need to sign in to do that
Don't have an account?
Michael Clarke 16
How do you create an image formula field in Lightning with Files (now Documents tab has disappeared)
Hi, there are many posts showing how to create formula fields for images and refer to the image in the Documents tab. In Lightning we have Files tab and not Documents tab. How do you get the image URL?
IMAGE( "/resource/1565740474000/GraphicsPackNew/fatcow/farmfresh/16/exclamation.png",......)
All Answers
Sorry for this issue you are encountering.
It's an image permissions thing - go to Files, Clicked on the down arrow next to each image, selected 'Sharing Settings' and change the Permissions of "Any user in your Company" from 'No Access' to 'Viewers'.
For more information please check with below link.
Please let us know if you need any further assistance.
Thanks,
Nagendra
To get the IMAGE from file using IMAGE formula field in Lightning you need to use the below URL pattern The Image which is stored in file are stored as a ContentDocument and then after you need to fetch the VersionId of the ContentDocument which you can use in the above IMAGE formula. SOQL for fetching ContentVersionId is : Please let me know if you need any more assistance.
Please mark it as the solution if it solved your purpose.
Thanks,
Jainam Contractor,
Salesforce Consultant,
Varasi LLC
www.varasi.com
IMAGE( "/resource/1565740474000/GraphicsPackNew/fatcow/farmfresh/16/exclamation.png",......)
Can you please help me that how can we refer
IMAGE("/sfc/servlet.shepherd/version/download/ContentVersionId","", 100, 200)
into our lightening page . I'm able to view the whole link on page but image is not coming there.
Thanks
https://help.salesforce.com/articleView?id=000327122&type=1&mode=1
The most salient point is this:
Obtain the URL to the image files uploaded:
In Files, Click an image to view the image preview.
Right click the image, then select Copy image address (could be Copy Image Location).
Save this image URL so you don't lose it.
You only need the part of the url that begins with /sfc/servlet.shepherd
Example URLs:
"/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId=06846000002mPro&operationContext=CHATTER&contentId=05T46000009hQHt/image.jpg"
"/sfc/servlet.shepherd/version/download/06846000002mPro"
So here's a sample formula suing part of the image URL
IMAGE("/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId=0680I00000I3uyX&operationContext=CHATTER&contentId=05T0I00000rsVoW", "Logo", 30, 100)