From fe8efbff8c91a8d7643f7ef7691f67d287e1a7d9 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:41:34 -0500 Subject: [PATCH] Use thumbnail images for posts in lists --- _includes/item_list.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_includes/item_list.html b/_includes/item_list.html index 2116875..0466575 100644 --- a/_includes/item_list.html +++ b/_includes/item_list.html @@ -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 -%}