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
AmbigaRamAmbigaRam 

Which datatype is used to upload an image?

Hi,

 

I created the object with some fields which collects the details of  students.

 

I want to upload an image via the field.

 

Which datatype is suitable for upload an image and how to do it?

 

Can I use the VisualForce for it? If it is, please help me how to do that?

 

Any help is appreciated.

 

Regards.,

R.Ambiga

Best Answer chosen by Admin (Salesforce Developers) 
Ashish_SFDCAshish_SFDC

Hi Ram, 

 

You can use teh Rich Text field which has an option to upload an image. 

 

Regards,

Ashish

All Answers

Ishan K SharmaIshan K Sharma

You can directly use <apex:image> tag in your vf page directly. First save the image in static resources in your salesforce org and then use..

 

<apex:image width="220" height="100"  id="x"  value="url of the image"/> something like this in vf page.

 

 

 

AmbigaRamAmbigaRam

Thank You Ishan,

 

But Is there any datatype available for uploading an image?

 

With Regards,

R.Ambiga

Ashish_SFDCAshish_SFDC

Hi Ram, 

 

You can use teh Rich Text field which has an option to upload an image. 

 

Regards,

Ashish

This was selected as the best answer
sandeep@Salesforcesandeep@Salesforce

Rich Text Area would be good enough