{% 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 _width = nil %} {% assign _height = nil %} {% assign _lqip = nil %} {% assign _class = nil %} {% for _attr in _attrs %} {% unless _attr contains '=' %} {% continue %} {% endunless %} {% assign _pair = _attr | remove: '"' | split: '=' %} {% capture _key %}{{ _pair | first }}{% endcapture %} {% capture _value %}{{ _pair | last }}{% endcapture %} {% case _key %} {% when 'width' %} {% assign _width = _value %} {% when 'height' %} {% assign _height = _value %} {% 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 = nil %} {% unless _src contains '//' %} {% assign _final_src = _path_prefix | append: _src %} {% capture _src_from %}"{{ _src }}"{% endcapture %} {% capture _src_to %}"{{ _final_src }}"{% endcapture %} {% assign _left = _left | replace: _src_from, _src_to %} {% endunless %} {% if _lqip %} {% unless _lqip contains ':' %} {% assign _final_lqip = _path_prefix | append: _lqip %} {% capture _lqip_from %}"{{ _lqip }}"{% endcapture %} {% capture _lqip_to %}"{{ _final_lqip }}"{% endcapture %} {% assign _left = _left | replace: _lqip_from, _lqip_to %} {% endunless %} {% endif %} {% assign _left = _left | replace: 'src=', 'data-src=' %} {% if _left contains 'class=' %} {% assign _left = _left | replace: 'class="', 'class="lazyload '%} {% else %} {% assign _left = _left | append: ' class="lazyload"' %} {% endif %} {% if _lqip %} {% assign _left = _left | replace: ' lqip=', ' data-lqip="true" src=' %} {% else %} {% if _width and _height %} {%- capture _svg -%} src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{ _width }} {{ _height }}'%3E%3C/svg%3E" {%- endcapture -%} {% assign _left = _svg | append: ' ' | append: _left %} {% assign _class = _class | append: ' shimmer' %} {% endif %} {% endif %} {% assign _left = _left | append: ' data-proofer-ignore' %} {% 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 %} {%- capture _wrapper_start -%} {%- endcapture -%} {% assign _img_content = _img_content | append: _wrapper_start %} {% assign _right = _right | prepend: '> {% 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 '