Skip to content

Commit

Permalink
Small fix to get bigger avatars on certain pages
Browse files Browse the repository at this point in the history
Google profile avatars plugins seems to add a suffix string that fetches
smaller images than what we want in certain cases.

This is a hotfix till we have a response from them for a better way to
handle this.
  • Loading branch information
comzeradd committed Jul 4, 2023
1 parent a3a2e9f commit 6fca4ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/author.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if ( author.avatar ) %}
<figure class="author-image" aria-label="{{ __( 'Picture of ' ~ author.name , 'planet4-master-theme' ) }}">
<img itemprop="image" class="author-pic"
src="{{ fn('get_avatar_url', author.id, {'size' : 300}) }}"
src="{{ fn('get_avatar_url', author.id, {'size' : 300}) | trim('=s96-c') }}"
alt="{{ author.name }}">
</figure>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/blocks/author_profile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<figure class="author-block-image d-block d-sm-block d-md-none">
<img
itemprop="image"
src="{{ fn('get_avatar_url', post.author.id, {'size' : 294 }) }}"
src="{{ fn('get_avatar_url', post.author.id, {'size' : 294 }) | trim('=s96-c') }}"
alt="{{ post.author.name }}"
/>
</figure>
Expand Down

0 comments on commit 6fca4ea

Please sign in to comment.