Cross-Domain pics not showing up in SharePoint? Its a known issue…

Oftentimes when setting up user profile images in SharePoint, we “house” the images in a website so they can easily be updated by the corporate photographer (seriously – some companies like to have a standard image “look” for their user profiles, part of their onboarding process). anyway, bad news bears if you are using Chrome, and sometimes even IE is a little flaky in the way it renders the image – Instead of getting a pretty profile pic, you get the dreaded red X (missing image icon).

I believe the underlying issue is related to CORS (Cross-Origin Resource Sharing – http://enable-cors.org/ – Note if you are trying this you need to enable it on the site requesting the pictures, not the site hosting the pictures) Happily, SharePoint 2013 has a switch (powershell only) that lets you enable the ability to remotely host the images – Try this on for size:

asnp Microsoft.SharePoint.PowerShell
$ShowMyPhotos = Get-SPWebApplication http://intranet.domain.internal
$ShowMyPhotos
.CrossDomainPhotosEnabled = $true
$ShowMyPhotos.Update()

Voila! Photos appear… This solution was found on Wictor’s blog: http://www.wictorwilen.se/sharepoint-2013-enabling-cross-domain-profile-pictures

Advertisements

About Brad Saide

I'm a SharePoint consultant. I'm also slowly going bald, seem to have a permanent spare tyre around my waist and enjoy socialising with friends over a beer or 10. The last 2 may possibly be related. Started working with SharePoint when the first version was in limited beta release (participated in the Technology Adoption Program while at Woolworths) and have been committed to the adoption of the technology as a business enabler ever since.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Cross-Domain pics not showing up in SharePoint? Its a known issue…

  1. Mihir says:

    I want to enable this on Sharepoint online. Is there any solution for this? For me also images are not displaying in the page.

    • Brad Saide says:

      Unfortunately “Powershell only” means just that… It’s done at the WebApp level which means Microsoft will not grant you access to make this change (as it could be associated with an exploit)… Sorry Mihir.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s