Add Contact Image to Experience Profile in Sitecore 9

Technical Leader
Valtech, India

dezembro 22, 2018

Adding contact image in Sitecore 9 is pretty straight forward, you might come across the requirement where you have to update the contact profile image in xProfile based on contact social profile or custom image URL.

xProfile-Image-1.pngThe code below can be used to set the profile image using Avatar Facet.

var trackerIdentifier = new

using (XConnectClient client =

var contact=

if (contact != null)
var profileImageUrl = "profile URL comes here";
var objWebClient = new
byte[] profileImageBytes =
string mimeType= "image/jpeg";
Avatar.DefaultFacetKey, new Avatar(mimeType, profileImageBytes)
MimeType= mimeType,
Picture= profileImageBytes

Hope this helps!

Happy learning!


Article was originally published on Ankit Joshi's Sitecore blog: Add contact image to experience profile in Sitecore 9

Enfrente os desafios da economia digital de hoje

Pronto para dar o primeiro passo e aumentar o seu potencial digital? Entre em contato com a Valtech hoje.
Fale Conosco

Contact Us