Search code examples
google-plusgoogle-plus-one

Creating a Google Plus badge without the profile picture


I am trying to create a Google+ Badge similar to the one on the Elder Scrolls online website - > http://www.elderscrollsonline.com/en-us

I reviewed the documentation at https://developers.google.com/+/web/badge/#static - there's no customization options to remove the profile picture / avatar for badges that are attached to a Google+ page (they are only available for community groups).

Any help in pointing me in the right direction would be appreciated. Thanks in advance.


Solution

  • You can see the Google+ markup they are using in the source of the page. It looks like a standard landscape pages badge.

    <div class="g-plus" data-width="266" data-href="https://plus.google.com/111527370705040778007" data-rel="publisher" data-theme="light"></div>
    

    There is an odd value for data-width though. The documentation specifies that landscape supports 273-450 pixels. So it looks like if you use an unsupported width small enough the badge will hide the avatar in favor of displaying the name. Since this is not supported the badge could randomly start only rendering at the minimum supported size.