📘
Lab Website Template docs
  • Introduction
    • Overview
    • Is this right for me?
    • Gallery
    • Support
  • Getting Started
    • Set up your site
    • Set up your URL
    • Tidy up your repo
    • Change your site
    • Preview your site
  • Basics
    • Repo structure
    • Configure your site
    • Edit pages
    • Write basic content
    • Use your logo
    • Customize your theme
    • Team members
    • Blog posts
    • Citations
    • Components
      • Section
      • Figure
      • Button
      • Icon
      • Feature
      • List
      • Citation
      • Card
      • Portrait
      • Post Excerpt
      • Alert
      • Tags
      • Float
      • Grid
      • Cols
      • Search
      • Site Search
  • Advanced
    • Update your template
    • Embeds
    • Math, diagrams, videos, etc.
    • Analytics
    • Data and collections
    • Jekyll plugins
    • Custom components
    • Background knowledge
Powered by GitBook
On this page
  1. Basics
  2. Components

Figure

An image with caption and link

PreviousSectionNextButton

Last updated 2 years ago

{%
  include figure.html
  image="images/group-photo.jpg"
  caption="The team at our annual Christmas party, 2025"
  link="team"
  width="400px"
%}
Parameter
Description

image

URL to image for the figure.

caption

Caption content. Can contain Markdown.

link

URL to navigate to when clicking on the image.

width / height

Dimensions of the image in px or %. You should only specify either width OR height, to maintain the original aspect ratio of the image. Image will shrink to fit smaller screen sizes.

images/fallback.svg is an image that will be shown in place of images (in any component) that fail to load. This is useful because you may often be linking to external image URLs that can become broken without notice.

Example of using with the component to make a full width banner:

{% include section.html size="full" %}

{% include figure.html image="images/banner.jpg" width="100%" %}

{% include section.html %}

Continued content

👁️
PREVIEW
section