How to upload images into custom object record in rich text field using visualforce page.when browse button clicks need to take from local system,while save button clicks need to save in that rich text field.anybody help me..

2 Answers 2


Looks like rich text area field will be a smoother option, if you are looking for mass upload of images to records directly.

Below link might help you!


if you are looking for the existing images which were in documents to be shown on object record, you can still rely on rich text option or as Nirmal suggested you can use formula field., to be more specific with the implementation, you might need two fields: 1)

  1. Text/url field which holds url of image from documents or static resources

  2. A formula field which can display image in desired height and width by using the value from field 1.

Considering a scenario, where real user might need to have a way to upload / alter those images, rich text area field will help more.



  • I have to save only one image in rich text field for particular user.if user browse image from local system that image only need to save in text rich field.
    – user
    Commented Oct 9, 2015 at 7:09

There is no custom field data type that is truly intended to store images. There are probably ways you could work around this, for instance storing SVG data in a long text area then using the UI to render the SVG.

Generally speaking the place that the platform wants you to store images is in the Attachment object that is automatically available for all custom objects, and most user-facing standard objects (at least top level objects, like Account, Contact, etc.).

Attachment contains a BLOB data type field. As such, it is fit for purpose to store any complex file. It will also auto-detect MIME type on upload.

The only catch is that this object is not updateable.

Recently, there was a feature added that posting to the chatter feed for a record would automatically add that feed item as an attachment. I've never explored under the covers with this feature, but this might also be helpful in that:

  1. Chatter posts are stored as content and can be versioned.
  2. Chatter posts can have hashtags/topics making for easier identification of the post.

These are the avenues I'd explore based on your question.

You must log in to answer this question.

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