I have User object Like following
{
"id": "25",
"name": "Mehul Rami",
"email": "mehul@demo.com"
}
user name contain both first and last name.
I want to generate profile image form user object. like following:
- Pick up any random color for background
- if name present then The first letters from the users first name and the first letter of the users last name. i.e. Mehul Rami would be MR. if name not present then The first char from the email and the first char after the @ in the email. i.e. mehul@demo.com would be MD.
Once, image is generate I want to convert it in base64
string.