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
AlgypugAlgypug 

Problem to insert image in the visual force component.

My problem: Image is not being displayed in the VisualForce component. I have created a VF Component to send emails. In the body of the email, my company logo should be displayed. This logo is stored in Static Resources. I have saved 5 copies of this logo and all in different formats. The format of the image is .jpeg, .jpg, .gif, .png and also in zipped format.

 

This image is getting displayed in VF Page but not in VF Component.

 

I feel like the image is not being parsed when I use the image in a visualforce component to send an email with the image in it

 

Given below is the code for getting the image displayed:

 

<div align = "right">

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

</div>

 

I have used <img > tag and other <apex:image> tag format and image formats like: .jpeg, .jpg, .gif and .png

But nothing worked.

 

Can anyone help?

Navatar_DbSupNavatar_DbSup

Hi,

You can try following snippet as reference:

 

<div>

<img align="right" src="{!$Resource. imagename}"/>

</div>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

AlgypugAlgypug

 

No! It did not! I followed what you have said but its not working:-(

Its been 10days now am trying to solve this problem.

Its not solved.