Skip to content

Instantly share code, notes, and snippets.

@dooman87
Created March 26, 2019 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dooman87/3743054e456ef665a07d0f2ef976a44a to your computer and use it in GitHub Desktop.
Save dooman87/3743054e456ef665a07d0f2ef976a44a to your computer and use it in GitHub Desktop.
{%- if image != blank -%}
{% if image.width > 180 %}{% include 'pixboost' with image: image, size: '180x' %} 180w {{ 180 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 360 %}{% include 'pixboost' with image: image, size: '360x' %} 360w {{ 360 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 540 %}{% include 'pixboost' with image: image, size: '540x' %} 540w {{ 540 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 720 %}{% include 'pixboost' with image: image, size: '720x' %} 720w {{ 720 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 900 %}{% include 'pixboost' with image: image, size: '900x' %} 900w {{ 900 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 1080 %}{% include 'pixboost' with image: image, size: '1080x' %} 1080w {{ 1080 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 1296 %}{% include 'pixboost' with image: image, size: '1296x' %} 1296w {{ 1296 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 1512 %}{% include 'pixboost' with image: image, size: '1512x' %} 1512w {{ 1512 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 1728 %}{% include 'pixboost' with image: image, size: '1728x' %} 1728w {{ 1728 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 1950 %}{% include 'pixboost' with image: image, size: '1950x' %} 1950w {{ 1950 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 2100 %}{% include 'pixboost' with image: image, size: '2100x' %} 2100w {{ 2100 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 2260 %}{% include 'pixboost' with image: image, size: '2260x' %} 2260w {{ 2260 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 2450 %}{% include 'pixboost' with image: image, size: '2450x' %} 2450w {{ 2450 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 2700 %}{% include 'pixboost' with image: image, size: '2700x' %} 2700w {{ 2700 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 3000 %}{% include 'pixboost' with image: image, size: '3000x' %} 3000w {{ 3000 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 3350 %}{% include 'pixboost' with image: image, size: '3350x' %} 3350w {{ 3350 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 3750 %}{% include 'pixboost' with image: image, size: '3750x' %} 3750w {{ 3750 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{% if image.width > 4100 %}{% include 'pixboost' with image: image, size: '4100x' %} 4100w {{ 4100 | divided_by: image.aspect_ratio | round }}h,{% endif %}
{{ image | img_url: 'master' }} {{ image.width }}w {{ image.height }}h
{%- endif -%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment