You need to sign in to do that
Don't have an account?

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:
Thanks
<td style="border:1px solid black; width: 33%;"> <apex:image id="logo" url="{!URLFOR($Resource.avistalogo)}" width="100%"/> </td>This is the current document File location:
https://cambrex--scpq.my.salesforce.com/06961000006G2t9?retUrl=%2F_ui%2Fcore%2Fchatter%2Ffiles%2FFileTabPageAnd 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:
https://cambrex--scpq--c.cs30.content.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=06861000006j6b4&operationContext=CHATTER&contentId=05T6100000JxdqPCan 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?
Thanks
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: For more information on IMAGEPROXYURL please go through the following link:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_image.htm
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