Footnotes and Galleries

Roe’s auto-gallery feature wraps consecutive images in a lightbox automatically. Footnote definitions can also contain images — and sometimes both appear in the same post. This article tests that each stays where it belongs.

Two or more consecutive images in the body become a gallery with lightbox. Here’s a row of three:

A single image

A lone image renders inline, no gallery wrapping:

yoav-aziz-tkcd-iwc4gi-unsplash

Footnotes containing images

When an author places images inside a footnote definition, they should stay inside the footnote when rendered — not leak out into the article body. The paragraph below references a footnote that contains two groups of images with prose in between1.

After a footnote with images, the body’s auto-gallery feature should still work. Here’s another set of consecutive images:

An author can also use an explicit gallery block inside a footnote to get the lightbox treatment there2.

  1. 1.

    This footnote contains images and a second paragraph of prose. The images should render as plain inline images inside the footnote, and the prose should render as a paragraph — not a code block.

    A second paragraph inside the same footnote.

    12649875954_f2c619fc03_h 12649804303_c16e1e7c1e_o

  2. 2.

    To opt into lightbox inside a footnote, indent a fenced gallery block by 4 spaces: