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

NameTypeRequiredDefaultSince
alignment_center_class_namestring-d-block text-center-

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

alignment_end_class_name

NameTypeRequiredDefaultSince
alignment_end_class_namestring-float-end ms-2-

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

alignment_start_class_name

NameTypeRequiredDefaultSince
alignment_start_class_namestring-float-start me-2-

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

class_name

NameTypeRequiredDefaultSince
class_namestring-img-fluid-

The class name of <img>.

figure_class_name

NameTypeRequiredDefaultSince
figure_class_namestring-figure-

The class name of <figure>.

figure_caption_class_name

NameTypeRequiredDefaultSince
figure_caption_class_namestring-figure-caption-

The class name of <figcaption>.

figure_image_class_name

NameTypeRequiredDefaultSince
figure_image_class_namestring-figure-img-

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

modern_format

NameTypeRequiredDefaultSince
modern_formatstring-webp-

Generate modern format version of image, empty to disable.