{% assign _content = include.content %} {% if _content contains '', '' | replace: '
', '' | replace: '
', '
' %} {% endif %} {% if _content contains '
' %}
  {% assign _content = _content
    | replace: '
', '' %} {% endif %} {% if _content contains '', '' | replace: '', '' %} {% endif %} {% assign IMG_TAG = ' {% if site.img_cdn %} {% if site.img_cdn contains '//' %} {% assign _path_prefix = site.img_cdn %} {% else %} {% assign _path_prefix = site.img_cdn | relative_url %} {% endif %} {% else %} {% assign _path_prefix = site.baseurl %} {% endif %} {% if page.img_path %} {% assign _path = page.img_path | append: '/' | replace: '//', '/' %} {% assign _path_prefix = _path_prefix | append: _path %} {% endif %} {% for _img_snippet in _img_snippets %} {% if forloop.first %} {% assign _img_content = _img_snippet %} {% continue %} {% endif %} {% assign _left = _img_snippet | split: '>' | first %} {% assign _right = _img_snippet | remove: _left %} {% unless _left contains 'src=' %} {% continue %} {% endunless %} {% assign _left = _left | remove: ' /' | replace: ' w=', ' width=' | replace: ' h=', ' height=' %} {% assign _attrs = _left | split: '" ' %} {% assign _src = null %} {% assign _lqip = null %} {% assign _class = null %} {% for _attr in _attrs %} {% unless _attr contains '=' %} {% continue %} {% endunless %} {% assign _pair = _attr | split: '="' %} {% capture _key %}{{ _pair | first }}{% endcapture %} {% capture _value %}{{ _pair | last | remove: '"' }}{% endcapture %} {% case _key %} {% when 'src' %} {% assign _src = _value %} {% when 'lqip' %} {% assign _lqip = _value %} {% when 'class' %} {% assign _class = _value %} {% endcase %} {% endfor %} {% if _class %} {% capture _old_class %}class="{{ _class }}"{% endcapture %} {% assign _left = _left | remove: _old_class %} {% endif %} {% assign _final_src = null %} {% assign _lazyload = true %} {% unless _src contains '//' %} {% assign _final_src = _path_prefix | append: _src %} {% assign _src_alt = 'src="' | append: _path_prefix %} {% assign _left = _left | replace: 'src="', _src_alt %} {% endunless %} {% if _lqip %} {% if _lqip contains 'data:' %} {% assign _lazyload = false %} {% assign _class = _class | append: ' blur' %} {% else %} {% assign _lqip_alt = 'lqip="' | append: _path_prefix %} {% assign _left = _left | replace: 'lqip="', _lqip_alt %} {% endif %} {% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %} {% else %} {% assign _class = _class | append: ' shimmer' %} {% endif %} {% if _lazyload %} {% assign _left = _left | append: ' loading="lazy"' %} {% endif %} {% if page.layout == 'home' %} {% assign _wrapper_start = '
' %} {% assign _img_content = _img_content | append: _wrapper_start %} {% assign _right = _right | prepend: '>` is wrapped by `` --> {% assign _parent = _right | slice: 1, 4 %} {% if _parent == '' %} {% assign _size = _img_content | size | minus: 1 %} {% capture _class %} class="img-link{% unless _lqip %} shimmer{% endunless %}" {% endcapture %} {% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %} {% else %} {% assign _wrapper_start = _final_src | default: _src | prepend: '' %} {% assign _img_content = _img_content | append: _wrapper_start %} {% assign _right = '> {% assign _img_content = _img_content | append: IMG_TAG | append: _left | append: _right %} {% endfor %} {% if _img_content %} {% assign _content = _img_content %} {% endif %} {% endif %} {% if _content contains '