creative designer

This is a simple demo page for testing imgix images with shopify (blog post). For those looking to optimise I've added some notes about the size reduction vs original. You'll see some Liquid code noted - refer to the original blog post to grab the snippet needed.

Optimisations

{% include 'imgix' src:foo q:5 auto:'format' %}

21.5kb (in Chrome) vs 105kb original. The auto=format paramater is really great in Chrome since it converts the image to webp. Knocking 80kb from an image is great stuff.

{% include 'imgix' src:foo q:5 %}

37.5kb vs 105kb original

{% include 'imgix' src:foo w:500 auto:'format' %}

10.3kb (in Chrome) vs 105kb original. Simple example of resizing an original image.

{% include 'imgix' src:foo w:995 auto:'format' %}

30.2kb (in Chrome) vs 105kb original. The 876 pixels was just picked since it's a not a round number. You might have a theme that warrants a specific pixel width. No sense loading more pixels than needed.

Let's run the same code on a new source image. If you're curious, the image is of this amazing bike from State. Colour almost matches my brand so that's a small bonus. The original image is 301kb, 1280px x 853px.

{% include 'imgix' src:foo q:5 auto:'format' %}

35.6kb (in Chrome) vs 301kb original.

{% include 'imgix' src:foo q:5 %}

55.1kb vs 301kb original

{% include 'imgix' src:foo w:500 auto:'format' %}

22.5kb (in Chrome) vs 301kb original.

{% include 'imgix' src:foo w:995 auto:'format' %}

56.2kb (in Chrome) vs 301kb original.

Other parameters

The examples below are not for optimisation but do highlight some of the other things that Imgix can do.

{% include 'imgix' src:foo exp:10 blur:50 %}

Useful for when you might want to use an image over css properties.

{% include 'imgix' src:foo invert:true %}

-

{% include 'imgix' src:foo mono:'f00' %}

-

{% include 'imgix' src:foo rot:30 %}

I am not sure when you'd ever need to rotate an image in Shopify, but never say never right!?...

{% include 'imgix' src:foo hue:120 %}

-

{% include 'imgix' src:foo rot:30 %}

-

Like to work with me?

Let's talk