Skip to content

Commit

Permalink
chore: clean up text for data URI size
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Aug 14, 2024
1 parent 2df921b commit 1ae773e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions author/ref/document-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ Encode all images in Metanorma XML and HTML output as inline data-URIs.
Defaults to `true`. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.11.0].

`:data-uri-maxsize:`::
Set the maximum permitted size of a Data URI-encoded image, in bytes. This defaults to `13981013` bytes (corresponding to
the Base64 encoding of a 10 MB image).
Set the maximum permitted size of a Data URI-encoded image, in bytes.
Defaults to `13981013` bytes (size of the Base-64 encoding of a 10 MB image).
If set to `0`, no maximum is enforced. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.1].

`:data-uri-attachments:`::
Expand Down
24 changes: 16 additions & 8 deletions author/topics/blocks/images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,22 @@ image::data:image/png;base64,ivBO...[alt text]
NOTE: Data URIs are only supported by Metanorma AsciiDoc, not other AsciiDoc
processors.

By default, images are stored in Metanorma XML as Data URI, rather than as links to external image files,
so that Metanorma XML and HTML can be distributed as single files, without bundling image files separately.
This behaviour can be disabled by setting `:data-uri-image: false` [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.11.0].

In order to prevent the Metanorma processor from running out of memory, a maximum permitted size for
Data URI-encoded images is enforced: this defaults to `13981013` bytes (corresponding to the Base64 encoding of a
10 MB image). The size can be changed by setting `:data-uri-maxsize:`. If this is set to `0`,
no maximum size is enforced. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.1].
By default, images are stored in Metanorma Semantic and Presentation XML as Data
URI, rather than as links to external image files, so that Metanorma XML and
HTML can be distributed as single files, without bundling image files
separately.

This behaviour can be disabled by setting
`:data-uri-image: false` [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v1.11.0].

In order to prevent the Metanorma processor from running out of memory, a
maximum permitted size for Data URI-encoded images is enforced.

* By default, the maximum size is `13981013` bytes. This corresponds to the
Base64 encoding of a 10 MB image.
* The size can be changed by setting `:data-uri-maxsize:`.
* If `:data-uri-maxsize:` is set to `0`, no maximum size is
enforced. [added in https://github.com/metanorma/metanorma-standoc/releases/tag/v2.9.1].


=== Image directory root path
Expand Down

0 comments on commit 1ae773e

Please sign in to comment.