Deprecated: Implicit conversion from float 1.1818181818181819 to int loses precision in /var/www/wp-content/mu-plugins/wp-login.php on line 13

Deprecated: Implicit conversion from float 1.074074074074074 to int loses precision in /var/www/wp-content/mu-plugins/wp-login.php on line 13

Deprecated: Implicit conversion from float 1.1818181818181819 to int loses precision in /var/www/wp-content/mu-plugins/wp-login.php on line 13
SharePoint : Broken user picture – SP or PH Add-ins – ridhvi.in
Close

SharePoint : Broken user picture – SP or PH Add-ins

In any hosted add-ins if you want to get & display user picture, the image Url would be something like this from the user properties.

"https://{mydrivedomain}/User%20Photos/Profile%20Pictures/ridhvi_MThumb.jpg”

Referencing the same Url to an image element will results in as broken image due to cross domain authentication issue while downloading the picture.

Work around for this would be

Construct the Url using “userphoto.aspx” as mentioned below which will download you the picture in different sizes like M or L.

https://{SPurl}/_layouts/15/userphoto.aspx?size=L&accountname=ridhvi@contoso.com

Happy Learning !!

© 2024 ridhvi.in | WordPress Theme: Annina Free by CrestaProject.