Skip to content

Commit 148addb

Browse files
committed
fix: update lqip with approved fix
1 parent 49e31bc commit 148addb

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

_layouts/home.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,15 @@
5555

5656
{% if post.image %}
5757
{% assign src = post.image.path | default: post.image %}
58-
{% unless src contains '//' %}
59-
{% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %}
60-
{% endunless %}
58+
{% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %}
6159

6260
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
6361

6462
{% assign lqip = null %}
6563

6664
{% if post.image.lqip %}
67-
{% assign lqip_url = post.image.lqip %}
68-
{% unless lqip_url contains '//' %}
69-
{% assign lqip_url = post.media_subpath | append: '/' | append: lqip_url | replace: '//', '/' %}
70-
{% endunless %}
71-
72-
{% capture lqip %}lqip="{{ lqip_url }}"{% endcapture %}
65+
{% capture lqip_url %}{% include media-url.html src=post.image.lqip subpath=post.media_subpath %}{% endcapture %}
66+
{% assign lqip = 'lqip="' | append: lqip_url | append: '"' %}
7367
{% endif %}
7468

7569
<div class="col-md-5">

0 commit comments

Comments
 (0)