mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
29 lines
654 B
Markdown
29 lines
654 B
Markdown
---
|
|
title: imageconfig
|
|
linktitle: imageConfig
|
|
description: Parses the image and returns the height, width, and color model.
|
|
godocref:
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [functions]
|
|
tags: [images]
|
|
signature:
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: []
|
|
deprecated: false
|
|
---
|
|
|
|
{{% warning %}}
|
|
`imageConfig` does not currently work in Hugo. See [the related `imageConfig` issue](https://github.com/spf13/hugo/issues/2806).
|
|
{{% /warning %}}
|
|
|
|
`imageConfig` parses the image and returns the height, width, and color model.
|
|
|
|
```golang
|
|
{{ with (imageConfig "favicon.ico") }}
|
|
favicon.ico: {{.Width}} x {{.Height}}
|
|
{{ end }}
|
|
```
|