Sha256: 17d09ec3d949e0f26135b76ca5de4558c40fa5652ce99c9015190d86a21e3568

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

{% assign sources = '' %}
{% if include.img.src or include.img.path %}
  {% assign srcset = null %}

  {% if include.img.srcset %}
    {% capture srcset %}{% for hash in include.img.srcset %}{% assign tmp = hash[1] %}{% include_cached smart-url url=tmp %} {{ hash[0] }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
  {% endif %}

  {% assign src = include.img.src | default:include.img.path %}
  {% capture sources %}
    src="{% include_cached smart-url url=src %}"
    {% if srcset %}srcset="{{ srcset | strip }}"{% endif %}
    {% if include.sizes %}sizes="{{ include.sizes }}"{% endif %}
  {% endcapture %}
{% else %}
  {% capture sources %}
    src="{% include_cached smart-url url=include.img %}"
  {% endcapture %}
{% endif %}

<img
  {{ sources }}
  {% if include.alt %}alt="{{ include.alt }}"{% endif %}
  {% if include.class %}class="{{ include.class }}"{% endif %}
  {% if include.property %}property="{{ include.property }}"{% endif %}
  {% if include.width %}width="{{ include.width }}"{% endif %}
  {% if include.height %}height="{{ include.height }}"{% endif %}
  {% if include.width and include.height %}loading="lazy"{% endif %}
/>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-theme-hydejack-9.0.3 _includes/components/hy-img.html
jekyll-theme-hydejack-9.0.2 _includes/components/hy-img.html
jekyll-theme-hydejack-9.0.1 _includes/components/hy-img.html
jekyll-theme-hydejack-9.0.0 _includes/components/hy-img.html