File: embed_images.txt

package info (click to toggle)
python-docutils 0.21.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,900 kB
  • sloc: python: 50,310; lisp: 14,475; xml: 1,810; javascript: 1,032; makefile: 107; sh: 78
file content (55 lines) | stat: -rw-r--r-- 1,608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Embedded images
===============

The image_loading_ setting can be used to tell the "html5" writer
to embed still images in the output document. [#]_ SVG images are
directly included, other images are base64_ encoded and included
as a `data URI`_.

.. figure:: file:../../../docs/user/rst/images/biohazard.png
   :alt: biohazard
   :align: left
   :width: 2em
   :figwidth: 45%
   :class: align-center

   Embedded PNG image in a figure.

.. figure:: file:../../../docs/user/rst/images/biohazard-scaling.svg
   :alt: biohazard
   :align: right
   :width: 2em
   :figwidth: 45%
   :class: align-center

   Embedded SVG image in a figure.

Embedded inline PNG image |inline-embedded| and SVG image
|inline-embedded-2| scaled to a height of 0.8 em.

.. |inline-embedded| image:: ../../../docs/user/rst/images/biohazard.png
   :height: 0.8 em
.. |inline-embedded-2| image::
   ../../../docs/user/rst/images/biohazard-scaling.svg
   :height: 0.8 em


.. image:: ../../../docs/user/rst/images/biohazard.svg
   :align: left
   :width: 1.5em
   :height: 1.5em
   :loading: lazy

The ``:loading:`` option of `"image" and "figure" directives`_ overrides the
image_loading_ setting for the respective image.

.. [#] Videos are only embedded if indicated in the
       `"image" directive`_'s "loading" option.

.. _image_loading:
    https://docutils.sourceforge.io/docs/user/config.html#image-loading
.. _base64: https://en.wikipedia.org/wiki/Base64
.. _data URI: https://en.wikipedia.org/wiki/Data_URI_scheme
.. _"image" directive:
.. _"image" and "figure" directives:
    ../../../docs/ref/rst/directives.html#images