Skip to content

Commit

Permalink
Use thumbnail images for posts in lists
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Feb 7, 2024
1 parent 548b0f9 commit fe8efbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _includes/item_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
{%- assign image_style_class = 'contained-image' -%}
{%- elsif item.image -%}
{%- assign imageurl = item.image -%}
{%- assign first = imageurl | slice: 0, 11 -%}
{%- if first == '/img/posts/' -%}
{%- assign body = imageurl | slice: 11, 1000 -%}
{%- assign imageurl = "/img-thumbnails/posts/" | append: body | append: ".webp" -%}
{%- endif -%}
{%- elsif item.youtube -%}
{%- assign imageurl = 'https://i3.ytimg.com/vi/' | append: item.youtube | append: '/hqdefault.jpg' -%}
{%- endif -%}
Expand Down

0 comments on commit fe8efbf

Please sign in to comment.