Chris
Chris

Reputation: 103

How to add image to user profile in stream.io nodejs?

I'm trying to add an image to my user profile using the below code but it doesn't appear to be working when I run my app. Does anyone know how to properly do this in Node?

client.user('the-user-id').update({
  name: "Gwen",
  occupation: "Software Engineer",
  gender: "female",
  image: "https://avatars1.githubusercontent.com/u/1069159?s=400&u=43561f3ac9eda2d28a4fc154443b0ad34ebc5208&v=4"
});

Upvotes: 2

Views: 1079

Answers (1)

Chris
Chris

Reputation: 103

I figured it out, you have to have the profile image named "profileImage" like so:

client.user('the-user-id').update({ name: "Gwen Stafani", occupation: "Software Engineer", gender: "female", profileImage: "https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"});

Upvotes: 1

Related Questions