Browse Source

Fix user avatar not being shown on profile page

Peter Justin 3 years ago
parent
commit
59efb6ef3b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      flaskbb/templates/user/profile_layout.html

+ 3 - 1
flaskbb/templates/user/profile_layout.html

@@ -1,4 +1,6 @@
 {%- from theme("_macros/navigation.html") import sidebar with context -%}
 {%- from theme("_macros/navigation.html") import sidebar with context -%}
+{%- from theme("_macros/utils.html") import avatar_img -%}
+
 {% extends theme("layout.html") %}
 {% extends theme("layout.html") %}
 {% set page_title = _("%(user)s - User", user=user.username) %}
 {% set page_title = _("%(user)s - User", user=user.username) %}
 
 
@@ -14,7 +16,7 @@
                 <div class="col-12 col-sm-auto mb-3">
                 <div class="col-12 col-sm-auto mb-3">
                     <div class="mx-auto" style="width: 150px;">
                     <div class="mx-auto" style="width: 150px;">
                         <div class="d-flex justify-content-center align-items-center">
                         <div class="d-flex justify-content-center align-items-center">
-                            <img class="rounded" src="{{ url_for('static', filename='avatar150x150.png') }}" alt="" />
+                            {{ avatar_img(user, size=150, class="rounded") }}
                         </div>
                         </div>
                     </div>
                     </div>
                 </div>
                 </div>