title: Questions about adding image to thumbnailphoto attribute from Active Directory
body: <p>I've been using adldap to add user image to the thumbnailphoto attribute for updating user profile information through active diectory. </p>
  
  <p>Here is what i did  as follows:</p>
  
  <p>I use code: </p>
  
  <p><strong>$modified = $adldap->user()->modify($account,  $attributes );</strong></p>
  
  <p>to update the user account with specific attributes (ex. thumbnailphoto)</p>
  
  <p>however, when I add information to $attribute.
  I convert the image url to base64 string ( ex. <strong>"/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAg.......")</strong>
  and then decode those string and update to $attributes. even though the thumbnailphoto attribute has value, but it can't display real image (i checked with software name "AD photo edit free edition")</p>
  
  <p>the decoded value i got  as follows: 
  <strong>"\u00c3\u0083\u00c2\u00bf\u00c3\u0083\u00c2\u0098\u00c3\u0083\u0......"</strong></p>
  
  <p>Which I compared with other user active directory thumbnailphoto attribute,  their image display perfectly .</p>
  
  <p>their thumbnailphoto attribute value is as follows:</p>
  
  <p><strong>"\u00ff\u00d8\u00ff\u00e0\u0000\u0010JFIF\u0000\u0001\u0001\u0001......"</strong></p>
  
  <p>I think those are hexdecimal value , and i try to convert my original encode value(<strong>"/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAg.......")</strong>)  into hex and update to the thumbnailphoto attribute  and turn out to be </p>
  
  <p>"\ffd8ffe0..... "
  but still not similar to the one that I got from the other users </p>
  
  <p>Just wondering , what is the correct way to update image to active directory </p>
  
  <p>Thanks</p>