Continuing the discussion from Image Processing in a Range:
Hi there,
After long search in docs and trying different options I tries this solutions by @jmooring however this also throw error:
at <$.Resources.GetMatch>: error calling GetMatch: unable to cast []interface {}{"/images/properties/gggg.jpg"} of type []interface {} to string
I use this simple code which works perfectly fine
{{ $coverImageget := resources.Get .Params.coverImage }}
{{ $coverImage := $coverImageget.Resize "1080x" }}
{
src: '{{ $coverImage.RelPermalink | absURL }}',
},
But for minor change where I use range I cannot make it work, there is 1 error after another. Why does this not work? what is other way where I can range and generate a $somename
so I can use it to $somenamet.Resize
etc. where did I go wrong in the below code?
{{ range .Params.images }}
{{ with $.Resources.GetMatch . }}
{{ with .Resize "500x " }}
{
src: '{{ .RelPermalink | absURL }}',
},
{{ end }}
{{ end }}
{{ end }}
Thanks