Based on a Drupal 7 backport of the caption module in Drupal 8.

Settings

Use the title and style attributes to build captions.

You can add image captions and align images left, right. Examples:

  • Caption an image: <img src="" title="This is a caption" />
  • Align an image: <img src="" style="float: left;" />
  • Caption & align an image: <img src="" title="Alpaca" style="float: left;" />

Use the attributes "data-caption" and "data-align" to build captions.

You can add image captions and align images left, right or centered. Examples:

  • Caption an image: <img src="" data-caption="This is a caption" />
  • Align an image: <img src="" data-align="center" />
  • Caption & align an image: <img src="" data-caption="Alpaca" data-align="right" />

Link to the image.

Link to the original image or an image style.

Warnings

Place your content you want to caption (for example an image) not inside a paragraph tag. The YACF filter wraps your content into a HTML figure element. Permitted parent tags for figure tags are those that allow flow elements (for example div, section, article).

Project information

Releases