Check if Assets Field Contains File of Type What’s the best way to check if an assets field contains a file of a certain type?

Something to the effect of: if assetsField.contains.file-of-type('image')
See kind in the docs: https://craftcms.com/docs/templating/assetfilemodel

I haven't tried it but I suspect it's something like this:

{% set file = assetsField.first %}
{% if file.kind == 'image' %}
  // blah blah
{% endif %}


There's also extension but kind is probably better here.