[SalesForce] How to display static resource image in visual force component

I have uploaded image to static resource. i just want to display it on the visual force component <apex:component> . i tried this way

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

but the image still is not rendering in the UI.

Thanks in advance

Best Answer

Hello below code is working for me Please try this

<apex:page >
<apex:image value="{!URLFOR($Resource.vfimagetest,'cats/kitten1.jpg')}"/>
</apex:page>
Related Topic