Putting image side by side

You can solve this with a shortcode.

Here is what I do in my blog:

Shortcode gallery.html:

`



{{ if len .Params | eq 9 }}









{{ end }}
{{ if len .Params | eq 6 }}






{{ end }}
{{ if len .Params | eq 3 }}



{{ end }}

`

And in a post you can insert images like this:

`{{< gallery
“/images/renovigo/IMG_3833.jpg”
“/images/renovigo/IMG_3834.jpg”
“/images/renovigo/IMG_3842.jpg”
“/images/renovigo/IMG_3844.jpg”
“/images/renovigo/IMG_3846.jpg”
“/images/renovigo/IMG_3847.jpg”
“/images/renovigo/IMG_3848.jpg”
“/images/renovigo/IMG_3849.jpg”
“/images/renovigo/IMG_3850.jpg”

}}`

This gives me a gallery with three pictures in a row and one, two or three rows.

It’s a hack. :wink:

1 Like