Skip to main content
Hi, i created a static resource to attach my logo in salesforce.then i copied the url and inserted in vf page .

i used the following code

<img src="https://ayush--recruitmen--c.visualforce.com/resource/1659528741000/ayushLogo?" style="width:250px;height:50px;" />.

My logo is not visible .it showing like this in preview . can anyone tell me why it is not visible. the image which i attached was jpeg format.

how to insert logo in vfpage?

thanks in advance
5 answers
  1. Aug 8, 2022, 9:33 AM
    Hi Suji,

    Please follow below concepts

    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"/>

    if you need any assistanse, Please let me know!!

    Kindly mark my solution as the best answer if it helps you.

    Thanks

    Mukesh
0/9000