Wrong number of args for ByType: want 1 got 0

I want to exclude videos from being processed but still make it appear as a resource. How can this be done?

execute of template failed at <resources>: wrong number of args for ByType: want 1 got 0
{{ range resources.Match (printf "images/%s/%s/*.*" .Section .Params.sku) }}
    {{ if and (eq resources.ByType "image" ) (not (in .Name "featured")) }}
      {{ with .Resize "300x" }}
        <div class="image">
          <img src="{{ .RelPermalink }}" alt="{{ $.Title }}">
        </div>
      {{ end }}
    {{ end }}
  {{ end }}
Summary
$ hugo env
hugo v0.134.3-5fb333b9f5ff4ec018f9d78910177d0bec1befb0+extended linux/amd64 BuildDate=2024-09-19T14:28:20Z VendorInfo=gohugoio
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.23.0"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"

Related: Use Content Adapters to get several images - #4 by jmooring

Replace that with .MediaType.MainType

I’m not in a position to test this at the moment, but I’m sure it’s mostly right.

Also, it doesn’t seem like you need to test for the media type… we’re matching against paths that contain the word “images”.