Configuration

The module supports Bootstrap v5 out-of-box, you'll need to tweak some configuration if you're not using Bootstrap.

Configuration

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}

Parameters

alignment_center_class_name

NameContextTypeRequiredDefaultSinceExample
alignment_center_class_name-string-d-block text-center--

The class name of <picture> and <figure> when aligning to center.

alignment_end_class_name

NameContextTypeRequiredDefaultSinceExample
alignment_end_class_name-string-float-end ms-2--

The class name of <picture>/<figure> when floating on end (right).

alignment_start_class_name

NameContextTypeRequiredDefaultSinceExample
alignment_start_class_name-string-float-start me-2--

The class name of <picture>/<figure> when floating on start (left).

class_name

NameContextTypeRequiredDefaultSinceExample
class_name-string-img-fluid--

The class name of <img>.

figure_class_name

NameContextTypeRequiredDefaultSinceExample
figure_class_name-string-figure--

The class name of <figure>.

figure_caption_class_name

NameContextTypeRequiredDefaultSinceExample
figure_caption_class_name-string-figure-caption--

The class name of <figcaption>.

figure_image_class_name

NameContextTypeRequiredDefaultSinceExample
figure_image_class_name-string-figure-img--

This class name will be appended into the <img> class list if caption is set.

modern_format

NameContextTypeRequiredDefaultSinceExample
modern_format-string-webp--

Generate modern format version of image, empty to disable.