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
manjunath kademanimanjunath kademani 

How to access rich text area image in sales force pragmatically. I want to send the image to another org through Rest api

I need to download an image and upload it in another org through API (in a Rich Textarea). I am not showing the image in same org in VF page. Is it possible to send rich text area  image from one org to another salesforce org through API?
NagendraNagendra (Salesforce Developers) 
Hi Manju,

Uploading Images Using the API
If records include rich text area fields containing images, you must convert the image to Base64 and supply that as the value in the relevant field. You can use a text editor to do this.

Solution
Encode the desired image into Base64.
Copy the entire Base64 image string to the clipboard.
Copy the following text and paste it into a text editor:1<img alt="<image_Name>" src="data:image/<image_File_Extension>;base64, <base64_Image_String>"></img>
Replace <image_Name> with the file name of the image. Don’t include the file extension. For example: Headshot1
Replace <image_File_Extension> with the extension of the image file. Don’t include the dot. For example: jpg
Replace <base64_Image_String> with the string that you copied in Step 2.
Copy the entire source text data and use it as the value in the relevant field of the API.
Upload the data.
Source: http://developer.force.com/cookbook/recipe/converting-a-rich-text-area-fields-image-for-api-upload

Also, please check with below links.
  • http://developer.force.com/cookbook/recipe/converting-a-rich-text-area-fields-image-for-api-upload
  • https://help.salesforce.com/apex/HTViewSolution?id=000002745&language=en_US
  • https://developer.salesforce.com/blogs/developer-relations/2011/09/using-binary-data-with-rest.html
Hope this helps.

Kindly mark this as solved if the information was helpful.

Thanks,
Nagendra