Figure

When to use
For any image referenced by number from the prose (e.g. “see Fig. 2”). The component wraps a <figure> with an outer frame and optional <figcaption>.
Example
import Figure from '../../components/widgets/Figure.astro';
<Figure
src="/images/cot_interp/2026-04-21/fig-2.png"
alt="Attribution map for token 12"
num={2}
caption="Attribution traces back through the residual stream."
/>
Props
| Prop | Type | Required | Notes |
|---|---|---|---|
src | string | yes | Image URL (typically under /images/...). |
alt | string | yes | Alt text. Required for accessibility. |
num | number | string | no | Figure number; renders a “Fig. N” badge in the caption. |
caption | string | no | Caption text shown next to the number. |
The image is loading="lazy" and decoding="async" by default.
When not to use
- For purely decorative imagery. Use a plain
<img>with empty alt. - For interactive plots. Embed an iframe or use a chart component.
- For inline icons. Use SVG inline.