Templates to help developers render images.
Become a backer or sponsor to support our work.
Use images/image to render images.
1{{ partial "images/image" (dict
2 "Page" .
3 "Filename" "/path/to/image.png"
4 "Alt" "Example Image"
5) }}
Filename| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
Filename | - | string | ✓ | - | - | - |
The filename or URL of image.
Alt| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
Alt | - | string | - | - | - | - |
Alternative text.
Caption| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
Caption | - | string | - | - | - | - |
Figure caption.
Page| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
Page | - | string | - | - | - | - |
The page variable for finding image resources.
ClassName| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
ClassName | - | string | - | img-fluid | - | - |
The class name of <img>.
Original| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
Original | - | boolean | - | false | - | - |
Whether to describe the original image info via data-* attributes.
LazyLoading| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
LazyLoading | - | boolean | - | true | - | - |
Whether to enable lazy loading.