Trim string from param

Let say I have following front matter

image_list: ["lama.png","handmade.jpg","foo.webp"]

my expectation is to get rid the extension so i can get lama handmade foo

How can I do that?

My ugly workaround

{{ $image := .Params.image_list }}
{{ range $image }}
            {{ $ext := path.Ext .  }}
            {{ trim . $ext }}
{{ end }}

That’s elegant, not ugly. If you would have been able to scan the actual files into .File objects, not the strings, you could have used .BaseFileName from the file variables: