I have uploaded html file in static resource as type text/html. While i am referencing that html file in the VF page images are not displaying on the page but html is having the image attribute.

<apex:page sidebar="false" contentType="text/html">
   <h3> <apex:outputLink value="{!URLFOR($Resource.Test)}" id="thelink" target="_blank"> Page2 </apex:outputLink> </h3>
 <iframe src="{!URLFOR($Resource.Test)}" width="100%" height="100%" scrolling="true" style="border:none"></iframe>
  • if you could include debug info that would be nice, such as, what status code do you see when trying to get the images? "images are not displaying" is not very helpful for troubleshooting. Thanks
    – glls
    Commented Oct 16, 2017 at 0:25

1 Answer 1


I used your code with the following HTML code (see below) and it worked fine. Are you using a relative path for the image? If you try to access your html file directly using WAMP http://localhost/imagename does it display?

<img src="https://www.google.co.il/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">
  • Thanks for the reply. I tried to access the image that was saved in my local host. So images are not displayed. I saved the image in static resource, by clicking on the view file, it routes me to the page. When i copied and pasted the url in the "src" then i am able to view the image on the page.
    – user5558
    Commented Sep 29, 2015 at 7:15
  • 1
    What I am curious is if your file name or folder is the issue? If you pasted that same code and ran the html page (via wamp or whatever) and can not get the image to load, it won't work in SF either. Once you can get the html page to display the image, then there is what to talk about.
    – user24509
    Commented Oct 6, 2015 at 5:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .