Skip to content

Commit

Permalink
Better avatar thumbnail filename format
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Feb 7, 2024
1 parent 024c816 commit 548b0f9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions _includes/inline_avatar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
{%- assign first = img | slice: 0, 12 -%}
{%- if first == '/img/people/' -%}
{%- assign body = img | slice: 12, 1000 -%}
{%- assign index = body | size | minus: 4 -%}
{%- assign body = body | slice: 0, index -%}
{%- assign img = "/img-thumbnails/people/" | append: body | append: "-48x48.webp" -%}
{%- assign img = "/img-thumbnails/people/" | append: body | append: ".webp" -%}
{%- endif -%}
{%- endif -%}
<span class="avatar inline-avatar" role="img" {%- if img -%}style="background-image: url({{img | absolute_url}}), url({{'/assets/avatar.jpg' | absolute_url}})"{%- endif -%}></span>

0 comments on commit 548b0f9

Please sign in to comment.