The module supports Bootstrap v5 out-of-box, you'll need to tweak some configuration if you're not using Bootstrap.
Become a backer or sponsor to support our work.
hugo.yaml
1params:
2 hugomods:
3 images:
4 modern_format: webp
hugo.toml
1[params]
2 [params.hugomods]
3 [params.hugomods.images]
4 modern_format = 'webp'
hugo.json
1{
2 "params": {
3 "hugomods": {
4 "images": {
5 "modern_format": "webp"
6 }
7 }
8 }
9}
v0.8.3, the params.images was renamed to params.hugomods.images, to get rid of conflicting with some Hugo built-in templates, see https://github.com/hugomods/images/issues/26.alignment_center_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
alignment_center_class_name | - | string | - | d-block text-center | - | - |
The class name of <picture> and <figure> when aligning to center.
alignment_end_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
alignment_end_class_name | - | string | - | float-end ms-2 | - | - |
The class name of <picture>/<figure> when floating on end (right).
alignment_start_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
alignment_start_class_name | - | string | - | float-start me-2 | - | - |
The class name of <picture>/<figure> when floating on start (left).
class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
class_name | - | string | - | img-fluid | - | - |
The class name of <img>.
figure_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
figure_class_name | - | string | - | figure | - | - |
The class name of <figure>.
figure_caption_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
figure_caption_class_name | - | string | - | figure-caption | - | - |
The class name of <figcaption>.
figure_image_class_name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
figure_image_class_name | - | string | - | figure-img | - | - |
This class name will be appended into the <img> class list if caption is set.
modern_format| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
modern_format | - | string | - | webp | - | - |
Generate modern format version of image, empty to disable.