You need to sign in to do that
Don't have an account?
Send Profile Photo in base64 Format
I have created API (an apex class with restful service - HttpGet) to expose the User Details to an external system in which I am sending all the details regarding users like Name, Email, Language etc. Now I want to send the Profile Photo also, I know we can query and get SmallPhotoUrl and FullPhotoUrl but I don't want URL. I want the actual image in Base64 format.
Any Ideas for this?
Any Ideas for this?
The above methods work fine, but I have used following to get the Profile Photo in Base64 format.
Here's an easy 4 step snippet to get a profile photo as a base64 image: Using this we don't need to hit API.
Hope this will help others
Thanks
Nirav
All Answers
Hi Nirav,
You will have to do a HTTP GET callout to get the profile image and convert it into base64 format.
Please take reference from below code snippet.
Please let me know if it helps.
Regards,
Ashish Kr.
Thanks a lot, this is the exactly what I needed.
The above methods work fine, but I have used following to get the Profile Photo in Base64 format.
Here's an easy 4 step snippet to get a profile photo as a base64 image: Using this we don't need to hit API.
Hope this will help others
Thanks
Nirav