I was thinking about building a shortcode that would produce a gallery from the indication of a folder. Something like this:
{{ $galleryimages := .Page.Resources.Match "gallery-*" }}
{{ range $galleryimages }}
{{ $thumbnail := .Resize "320x" }}
<figure itemscope itemtype="http://schema.org/ImageObject" class="image">
<a href="{{ .Permalink }}" itemprop="contentUrl" data-size="--SIZE--" >
<img src="{{ $thumbnail.Permalink }}" itemprop="thumbnail" alt="--caption--" />
</a>
<figcaption itemprop="caption description">
--caption--
<span itemprop="copyrightHolder">--copyrightHolder--</span>
</figcaption>
</figure>
{{ end }}
The only missing piece, is to be able to get the width and height of the image for the data-size
attribute.
Is there a way to get this directly from the file?