Properly detect local page preview images
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
c81436edc4
commit
cd90d97c42
1 changed files with 1 additions and 1 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Reference in a new issue