title | description | summary | date | lastmod | draft | menu | weight | toc | seo | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
img |
2023-11-09 16:50:46 +0100 |
2023-11-09 16:50:46 +0100 |
false |
|
510 |
true |
|
You can add images to your .html
pages by using the img
partial. See the img partial reference page for all available arguments.
{{- partial "img" (dict "page" . "src" "images/vincent-van-zalinge-IicWDdQUfsQ-unsplash.jpg") }}
{{- $opts := dict
"page" .
"src" "images/vincent-van-zalinge-IicWDdQUfsQ-unsplash.jpg"
"width" 768
"sizes" "auto"
"formats" (slice "webp" "jpeg")
"process" "fill 1600x900"
"lqip" "16x webp q20"
"decoding" "async"
"fetchpriority" "auto"
"loading" "eager"
"alt" "A close-up of a butterfly on a rope"
"title" "A close-up of a butterfly on a rope"
"class" "foo"
}}
{{- partial "img" $opts }}