Figure

Figure is an Eleventy shortcode. It does not require a Nunjucks import statement.

Images with captions should be called with the Figure component. This component is designed for use within articles and diary posts. If you want to render a standalone image or need more fine-grain control, use the Img component.

Open this example in a new tab
View the code for this example
{% figure {
  url: '/assets/images/articles/brownhills/middleton-bridge.jpeg',
  caption: 'A photo of a wonderful looking bridge, on its brick facade there’s a nameplate that reads “Middleton Bridge”.',
  classes: 'example-class',
  link: '#'
} %}

Shortcode arguments

Call the shortcode like so:

{% figure { 
  url: '/path/to/image.jpg', 
  caption: 'The image caption', 
  classes: 'classname', 
  link: 'https://roobottom.com',
  transform: 'wide',
  isLocal: false
} %}
Argument Type Description
url string Required. The URL of the image.
caption string Required. The caption for the image.
classes string Classes to apply to the figure container.
link string A link for the image, if required.
transform string A transform name from the set of available image transformations
isLocal bool Set to true to disable remote image fetching via ImageKit. Defaults to false.