Files
hugo/docs/content/templates
Tristan Rice a49f838cd0 tpl: Add imageConfig function
Add imageConfig function which calls image.DecodeConfig and returns the height, width and color mode of the image. (#2677)

This allows for more advanced image shortcodes and templates such as those required by AMP.

layouts/shortcodes/amp-img.html
```
{{ $src := .Get "src" }}
{{ $config := imageConfig (printf "/static/%s" $src) }}

<amp-img src="{{$src}}"
           height="{{$config.Height}}"
           width="{{$config.Width}}"
           layout="responsive">
</amp-img>
```
2016-11-16 13:00:45 +01:00
..
2016-01-06 23:55:18 +01:00
2016-01-06 23:55:18 +01:00
2016-01-06 23:55:18 +01:00
2016-08-20 21:54:14 +02:00
2016-11-16 13:00:45 +01:00
2016-01-06 23:55:18 +01:00
2016-09-18 19:16:39 +02:00
2016-01-06 23:55:18 +01:00
2016-09-06 18:32:15 +03:00