Is it possible to set a list of asset (images) based on their width? So i just want a list of images that are wider than 1000px for example... Without having to check in a for loop. So on the end of - craft.assets for example.
1 Answer
If you want to check all assets across all sources, it'd be this:
{% set assets = craft.assets.width('> ' ~ 1000).find() %}
If you want all assets from a particular source, it'd be:
{% set assets = craft.assets.source('sourceHandle').width('> ' ~ 1004).find() %}