| 1 |
--- |
| 2 |
title: images.Config |
| 3 |
description: Returns an image.Config structure from the image at the specified path, relative to the working directory. |
| 4 |
categories: [] |
| 5 |
keywords: [] |
| 6 |
params: |
| 7 |
functions_and_methods: |
| 8 |
aliases: [] |
| 9 |
returnType: image.Config |
| 10 |
signatures: [images.Config PATH] |
| 11 |
aliases: [/functions/imageconfig] |
| 12 |
--- |
| 13 |
|
| 14 |
> [!NOTE] |
| 15 |
> This is a legacy function, superseded by the [`Width`][] and [`Height`][] methods for [global resources](g), [page resources](g), and [remote resources](g). See the [image processing][] section for details. |
| 16 |
|
| 17 |
```go-html-template |
| 18 |
{{ $ic := images.Config "/static/images/a.jpg" }} |
| 19 |
|
| 20 |
{{ $ic.Width }} → 600 (int) |
| 21 |
{{ $ic.Height }} → 400 (int) |
| 22 |
``` |
| 23 |
|
| 24 |
Supported image formats include AVIF, BMP, GIF, HEIC, HEIF, JPEG, PNG, TIFF, and WebP. |
| 25 |
|
| 26 |
[`Height`]: /methods/resource/height/ |
| 27 |
[`Width`]: /methods/resource/width/ |
| 28 |
[image processing]: /content-management/image-processing/ |