Back to Hugo

images.Config

docs/content/en/functions/images/Config.md

0.161.1576 B
Original Source

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

go-html-template
{{ $ic := images.Config "/static/images/a.jpg" }}

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

Supported image formats include AVIF, BMP, GIF, HEIC, HEIF, JPEG, PNG, TIFF, and WebP.