Templates

Templates to help developers render images.

Image Template

Use images/image to render images.

1{{ partial "images/image" (dict
2  "Page" .
3  "Filename" "/path/to/image.png"
4  "Alt" "Example Image"
5) }}

Image Template Parameters

Filename

NameTypeRequiredDefaultSince
Filenamestring--

The filename or URL of image.

Alt

NameTypeRequiredDefaultSince
Altstring---

Alternative text.

Caption

NameTypeRequiredDefaultSince
Captionstring---

Figure caption.

Page

NameTypeRequiredDefaultSince
Pagestring---

The page variable for finding image resources.

ClassName

NameTypeRequiredDefaultSince
ClassNamestring-img-fluid-

The class name of <img>.

Original

NameTypeRequiredDefaultSince
Originalboolean-false-

Whether to describe the original image info via data-* attributes.

LazyLoading

NameTypeRequiredDefaultSince
LazyLoadingboolean-true-

Whether to enable lazy loading.