function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael BobeeMichael Bobee 

Insert an Image based on User Profile

 Is it possible to dynamically select a Static Resource based on a user variable to load an image on a Visualforce page? I know it is not a best practice to use conditional logic on a VF page. I want to change a logo on the top of a VF PDF based on the division of the user genrating the PDF. Thank you.
Best Answer chosen by Michael Bobee
Vinit_KumarVinit_Kumar
Yes you can do that just try something like below :-

// I am checking if Account site is Germany,then display Germany logo else India logo
<apex:image id="theImage" value="{!If(Account.Site == "Germany", $Resource.Germany, $Resource.India)}" width="25" height="12"/>

If this helps,please ,mark it as best answer to help others :)