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
Rachel JonesRachel Jones 

Visualforce Code to show a picture not working

Hi - I have created a visualforce page to show a picture saved in attachments on a lead record.  But I cannot figure out why it is not showing, no error or anything the area is just blank after I have added it to the page layout.

picture code
ManojjenaManojjena
Hi Rachel ,

How many attachment basically you have in one laed Named GE.jpg ?
Rachel JonesRachel Jones
Hi - just one attachment 
James LoghryJames Loghry
Try removing the rendered attribute to see if the image is displayed.  Your rendered attribute needs another "=" in it.  For instance:
 
rendered="{!att.Name == 'GE.jpg'}"


If that doesn't work try switching from using value to using url, as in this example:

http://blog.giovannimodica.com/post/showing-image-attachments-in-a-visualforce-page

sandeep sankhlasandeep sankhla
Hi Rachel,

James is correct you need to compare with == operator then only it will work...URL and Value both will work in this case..

Thanks,
Sandeep