Skip to content

Instantly share code, notes, and snippets.

View openxthinking's full-sized avatar

OpenThinking openxthinking

View GitHub Profile
@openxthinking
openxthinking / image.liquid
Last active November 19, 2021 12:04
Shopify image orientation in liquid: Find if image is Landscape, Portrait or Square
{%- liquid
if img.width > img.height
assign imgOrientation = 'landscape'
elsif img.width < img.height
assign imgOrientation = 'portrait'
else
assign imgOrientation = 'square'
endif
-%}