{% assign largest = resized | sort: 'width' | last %} {% capture srcset %} {% for i in resized %} {{ i.path | relative_url }} {{ i.width }}w, {% endfor %} {% endcapture %}