diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index 7e899ff..b5b77b4 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -78,9 +78,9 @@ {% capture _value %}{{ _attr | split: '=' | last | replace: '"', '' }}{% endcapture %} {% case _key %} - {% when 'width' %} + {% when 'width', 'w' %} {% assign _width = _value %} - {% when 'height' %} + {% when 'height', 'h' %} {% assign _height = _value %} {% endcase %} diff --git a/_layouts/post.html b/_layouts/post.html index 222f20a..ef2450e 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -16,8 +16,18 @@ tail_includes: {% endcapture %} {{ page.image.alt | default: + + {% if page.image.width %} + width="{{ page.image.width }}" + {% elsif page.image.w %} + width="{{ page.image.w }}" + {% endif %} + + {% if page.image.height %} + height="{{ page.image.height }}" + {% elsif page.image.h %} + height="{{ page.image.h }}" + {% endif %}> {% endif %}

{{ page.title }}