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
AKhanAKhan 

Images not getting displayed

Hi,

 

I am new to visualforce and was trying to use my existing HTML code for developing a new page. The problem is that when I save the code in page editor, the images are not getting displayed.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
AKhanAKhan

Thank for your reply...got the solution.

All Answers

MrTikMrTik

Hi, AKhan,

 

From what I understand you will have to upload your images as static resources and then use them in your code like following.

 

 <apex:image url="{!$Resource.logo}" />

 

This assumes that you have named your uploaded images as Resource.

 

Other then that you can use the images if it is hosted on any other web server which is accessible publicly.

 

Hope this helps.

RyanGuestRyanGuest

Also, make sure your static resources are marked as "public".

 

If you are straight up copy and pasting HTML, you'll need to fix all the relative links to use absolute URLs.

AKhanAKhan

Thank for your reply...got the solution.

This was selected as the best answer