{% if product.media.size < 2 %} small-hide{% endif %}

New Member
1 0 0

I came across the above expression with respect to the mobile image slider in the Dawn product section and was wondering how and why the size of 2 was being used.

Is this width in pixels or is there an indexing system for media sizes or is it referring to quantity of images/media?

Shopify Partner
490 52 88

This is an accepted solution.

Hello  , @PeteFede 

Yes , it referring  to quantity of product images. In short this condition means that if there are less than 2 product images then apply small-hide class.

I hope this makes sense.

Ittanta Technologies Pvt. Ltd. | Shopify Expert
If reply is helpful, please Like and Accept Solution.
To hire us, contact us at info@ittanta.com