updateUserProfileImage()
Updates a user's profile image. Returns a User
object.
function updateUserProfileImage(userId: string, params: { file: Blob | File }): Promise<User>
const userId = 'user_123'
const fileBits = ['profile-pic-content']
const fileName = 'profile-pic.png'
const file = new File(fileBits, fileName, { type: 'image/png' })
const params = {
file,
}
const response = await clerkClient.users.updateUserProfileImage(userId, params)
Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint POST/users/{user_id}/profile_image
. See the BAPI reference for more information.
Feedback
Last updated on