Reply
Regular Contributor
KIRONKUMARK
Posts: 50
0

How to add images in visualforce page

We want to add hundreds of images in visualforce page(like images in online shopping) and the user of the application should be upload/delete the image by himself dynamically?

ANY HELP WILL BE GREATLY UPRECIATED

Thanks in Advance,
Naga Kiran Kumar K
Regular Contributor
wt35
Posts: 60
0

Re: How to add images in visualforce page

Use the standard tag for images: <apex:image>

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_image.htm

 

apex:image


A graphic image, rendered with the HTML <img> tag.


Example

<apex:image id="theImage" value="/img/myimage.gif" width="220" height="55"/>


The example above renders the following HTML:
<img id="theImage" src="/img/myimage.gif" width="220" height="55"/>


Resource Example
<apex:image id="theImage" value="{!$Resource.myResourceImage}" width="200" height="200"/>


The example above renders the following HTML:
<img id="theImage" src="<generatedId>/myResourceImage" width="200" height="200"/>


Zip Resource Example
<apex:image url="{!URLFOR($Resource.TestZip, 'images/Bluehills.jpg')}" width="50" height="50" />


The example above renders the following HTML:
<id="theImage" src="[generatedId]/images/Bluehills.jpg" width="50" height="50"/>