From cd90d97c4293ea54633ac32715b75b6432be671a Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Sat, 24 Dec 2022 14:31:23 +0100 Subject: [PATCH] Properly detect local page preview images Signed-off-by: Alexander Borsuk --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index acc710be..8986c96b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,7 @@ {%- set preview_image = resource.extra.preview_image -%} {%- elif resource.assets %} {%- set basename = resource.assets[0] | split(pat='/') | last %} - {%- if basename is ending_with('.jpg') %} + {%- if basename is ending_with('.jpg') or basename is ending_with('.jpeg') or basename is ending_with('.png') %} {%- set preview_image = resource.path ~ basename -%} {%- endif %} {%- endif %}