Display social media profile pics using social media handles
Using the social media handles supported by https://avatars.io, social media profile pictures are displayed in a circle and clicking them will open the user's social media page in a new window. The handle is also displayed as a tooltip when hovering over the profile image.
Note: https://avatars.io currently supports Twitter, Facebook, Instagram and Gravatar
avatars.io come in 3 standard sizes:
To change the size, adjust the portion of the
src url to use the keyword from the table above and then adjust the
height style attributes for the containing
This format will work with Choice and Text columns without any changes. To use Lookup columns, you'll need to change the 2 occurences of
The field values are case insensitve and should be just the user's twitter handle with no @.
|generic-socialpic.json||David Warner II / Warner.Digital|
|1.0||July 21, 2018||Initial release|
|1.1||August 20, 2018||Updated to use Excel-style expressions|
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
A similar wizard is also included in the Column Formatter webpart that allows full customization.
An additional version using Abstract Tree Syntax (AST) is also provided for environments where the Excel-style expressions are not supported.