You need to sign in to do that
Don't have an account?
Whyser
VisualForce RenderAs PDF Not Rending External Image from Production Static Resource
i'm running into an issue using Visualforce trying to reference a static resource imageon my Salesforce Production instance from my Salesforce Sandbox instance.
The Static Resource has it's cache control set to Public.
I'm aware that referencing external images require that the Remote site settings are set on my Salesforce Sandbox instance
Remote Site Name: test
Remote Site URL: https://images.metropuzzle.com
Remote Site Name: Salesforce_Production
Remote Site URL: https://[mydomain].my.salesforce.com/
And with the following code
I get the following results:
What am I doing wrong?
The Static Resource has it's cache control set to Public.
I'm aware that referencing external images require that the Remote site settings are set on my Salesforce Sandbox instance
Remote Site Name: test
Remote Site URL: https://images.metropuzzle.com
Remote Site Name: Salesforce_Production
Remote Site URL: https://[mydomain].my.salesforce.com/
And with the following code
<apex:image value="https://images.metropuzzle.com/tmp/rgb-HP1361-3D2-1000px-300dpi_medium.jpeg" /> <apex:image value="https://[mydomain].my.salesforce.com/resource/XXXXXXXXX/Logo" />
I get the following results:
What am I doing wrong?
You can try below steps and see if that works.
- Modify your user/s profile and enable "Create delivery content" under administrative permissions
- Create new contentDistribution object, associating your contentVersionId on the related field (same name)
- Once created, this object will have fields with a public URL where you can access your file ("ContentDownloadUrl" and/or "DistributionPublicUrl")
Please mark as Best Answer if above information was helpful.Thanks,
Hi Whyser,
You must open any file in file and click the button labelled "public link" to obtain a public link that you can share with another user.
then right click on the image and click on "open image in new tab" then copy the url then put that url in the vf page then it will wotk
Please mark as Best Answer if above information was helpful.