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

NameContextTypeRequiredDefaultSinceExample
Filename-string---

The filename or URL of image.

Alt

NameContextTypeRequiredDefaultSinceExample
Alt-string----

Alternative text.

Caption

NameContextTypeRequiredDefaultSinceExample
Caption-string----

Figure caption.

Page

NameContextTypeRequiredDefaultSinceExample
Page-string----

The page variable for finding image resources.

ClassName

NameContextTypeRequiredDefaultSinceExample
ClassName-string-img-fluid--

The class name of <img>.

Original

NameContextTypeRequiredDefaultSinceExample
Original-boolean-false--

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

LazyLoading

NameContextTypeRequiredDefaultSinceExample
LazyLoading-boolean-true--

Whether to enable lazy loading.