Images

Images can be a great supplement to technical documentation text. Sphinx provides control for their alignment in the content, as well as the ability to add captions.

Basic Usage

.. image:: https://source.unsplash.com/200x200/daily?cute+animals

This is from reStructuredText.
https://source.unsplash.com/200x200/daily?cute+animals

This is from reStructuredText.

![](https://source.unsplash.com/200x200/daily?cute+animals)

This is from Markdown.

This is from Markdown.

Alignment

.. image:: https://source.unsplash.com/200x200/daily?cute+animals
   :align: center


This is from reStructuredText.
https://source.unsplash.com/200x200/daily?cute+animals

This is from reStructuredText.

```{image} https://source.unsplash.com/200x200/daily?cute+animals
:align: center
```

This is from Markdown.
https://source.unsplash.com/200x200/daily?cute+animals

This is from Markdown.

Captions

.. figure:: https://source.unsplash.com/200x200/daily?cute+animals

    This is a captioned image, which needs the "figure" directive.

This is from reStructuredText.
https://source.unsplash.com/200x200/daily?cute+animals

This is a captioned image, which needs the “figure” directive.

This is from reStructuredText.

```{figure} https://source.unsplash.com/200x200/daily?cute+animals
This is a captioned image, which needs the "figure" directive.
```

This is from Markdown.
https://source.unsplash.com/200x200/daily?cute+animals

This is a captioned image, which needs the “figure” directive.

This is from Markdown.

Different images for dark/light mode

Furo supports light mode and dark mode colours out-of-the-box. However, certain images do not work well against certain backgrounds (eg: if the image has a white background).

You can use the only-light and only-dark classes, to show different images based on the currently active colour scheme.

.. image:: https://source.unsplash.com/200x200/daily?cute+dogs
   :align: center
   :class: only-light


.. image:: https://source.unsplash.com/200x200/daily?cute+cats
   :align: center
   :class: only-dark


.. figure:: https://source.unsplash.com/200x200/daily?cute+cats
   :align: center
   :figclass: only-light


.. figure:: https://source.unsplash.com/200x200/daily?cute+dogs
   :align: center
   :figclass: only-dark


This is from reStructuredText.
https://source.unsplash.com/200x200/daily?cute+dogs https://source.unsplash.com/200x200/daily?cute+cats
https://source.unsplash.com/200x200/daily?cute+cats
https://source.unsplash.com/200x200/daily?cute+dogs

This is from reStructuredText.

```{image} https://source.unsplash.com/200x200/daily?cute+dogs
:align: center
:class: only-light
```

```{image} https://source.unsplash.com/200x200/daily?cute+cats
:align: center
:class: only-dark
```

```{figure} https://source.unsplash.com/200x200/daily?cute+cats
:align: center
:figclass: only-light
```

```{figure} https://source.unsplash.com/200x200/daily?cute+dogs
:align: center
:figclass: only-dark
```

This is from Markdown.
https://source.unsplash.com/200x200/daily?cute+dogs https://source.unsplash.com/200x200/daily?cute+cats
https://source.unsplash.com/200x200/daily?cute+cats
https://source.unsplash.com/200x200/daily?cute+dogs

This is from Markdown.