HUGO

How to get all images from a post front-matters with resources.Get

I want to range all image from a post images = ["1.png", "2.png", "3.png"] front-matter with resources.Get .

I did it for one image which looks like {{ $image:= resources.Get .Params.image }}, But I want all images. How to do it?

One way of going about it would be to range through the .Params.images array and then within its context use something like {{ $image:= resources.Get . }}

1 Like

Thank You, It works :+1:t2:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.