+ Start a Discussion
Peter Martensen 8Peter Martensen 8 

I need help with an image link in a Visualforce page

I have a VF page that creates a pdf with an outdated image link.  I can't find the image in my org, so I want to change the link to a known image.  This is the current code:
<td style="border:1px solid black; width: 33%;">
                  <apex:image id="logo" url="{!URLFOR($Resource.avistalogo)}" width="100%"/>
This is the current document File location:
And this is the location if I preview the file, then right click the image, then copy the image location, the paste it into a browser window:
Can someone help me get that image to show up on the pdf that the VF page creates?  I can also give the location in the old Classic Documents folder, but I thought I'd try with the new Files location first.  The file is currently a png file, or does it need to be a jpg file?

Deepali KulshresthaDeepali Kulshrestha
Hi Peter,

Protect your users from unauthorized requests by using the IMAGEPROXYURL function to securely fetch images outside your org’s server. Loading a third-party image can initiate a malicious authentication request meant to steal Salesforce usernames and passwords. This Visualforce function loads external images over HTTPS and prevents images from requesting user credentials.Include the IMAGEPROXYURL function on the src attribute of a <img> tag or the valueattribute of an <apex:image> object.Please refere to the following code as it may be helpful in solving your query:
<apex:page standardController="Contact" >
    <apex:image id="salesforce-twitter"  value="https://pbs.twimg.com/profile_images/1014182734606897153/JfveQU3Z_400x400.jpg"     alt="Salesforce on Twitter" />
For more information on IMAGEPROXYURL please go through the following link:

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha