hugo/docs/content/en/functions/images/Config.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

1.1 KiB

title description categories keywords action aliases
images.Config Returns an image.Config structure from the image at the specified path, relative to the working directory.
aliases related returnType signatures
image.Config
images.Config PATH
/functions/imageconfig

See image processing for an overview of Hugo's image pipeline.

{{ $ic := images.Config "/static/images/a.jpg" }}

{{ $ic.Width }} → 600 (int)
{{ $ic.Height }} → 400 (int)

Supported image formats include GIF, JPEG, PNG, TIFF, and WebP.

{{% note %}} This is a legacy function, superseded by the Width and Height methods for global, page, and remote resources. See the image processing section for details.

{{% /note %}}