Skip to main content

How do I change the default profile image that displays for signups without a profile image set

If you are showing the activity feed or comments on a page and a person without a profile picture shows up in that feed, their default image is one that looks similar to the NationBuilder logo in that it is two overlapping grey buildings. Here's how to change that.

Official response from

Updated 8.2.18 - First, you need to be using a custom theme to do this. Then, you will want to upload a new default profile picture to the "Files" tab of your theme. This image should be 72px by 72px and should be a PNG file. 

The profile that renders in an activity streem draws upon a file named "profile-avatar.png". While it is not possible to overwrite this image file, you can use liquid to replace it with an image of your choosing. For example, the standard code that renders profile photos in your activity stream stream is located in the _page_stream.html file, and is as follows:

<div class="stream-pic">{{ activity.signup.profile_image }}</div>

To replace this photo with a new default photo, you will want to use liquid to check if the relevant signup profile is using a default photo. If so, you will replace it with a custom image URL. Your new code might look as follows:

<div class="stream-pic">
   {% if activity.signup.profile_image_url contains "profile-avatar" %}
      <img src="*new default image URL*">
   {% else %}
      {{ activity.signup.profile_image }}
  {% endif %} 
</div>

Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.