mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
36
docs/content/en/functions/images/Config.md
Normal file
36
docs/content/en/functions/images/Config.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: images.Config
|
||||
description: Returns an image.Config structure from the image at the specified path, relative to the working directory.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: []
|
||||
related: []
|
||||
returnType: image.Config
|
||||
signatures: [images.Config PATH]
|
||||
aliases: [/functions/imageconfig]
|
||||
---
|
||||
|
||||
See [image processing] for an overview of Hugo's image pipeline.
|
||||
|
||||
[image processing]: /content-management/image-processing/
|
||||
|
||||
```go-html-template
|
||||
{{ $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.
|
||||
|
||||
[`Width`]: /methods/resource/width
|
||||
[`Height`]: /methods/resource/height
|
||||
[global]: /getting-started/glossary/#global-resource
|
||||
[image processing]: /content-management/image-processing
|
||||
[page]: /getting-started/glossary/#page-resource
|
||||
[remote]: /getting-started/glossary/#remote-resource
|
||||
{{% /note %}}
|
Reference in New Issue
Block a user