pub enum HtmlImageMode {
Reference,
DataUri,
Omit,
}Expand description
How an HTML export represents an inline image.
HTML is the one text export where the choice is genuinely open: the output
is a single string, but an <img> can either point at a file the caller
will write beside it or carry the bytes inline.
Variants§
Reference
Emit src exactly as the document stores it and embed nothing.
The default, because it is the only mode that cannot silently inflate the output: resolving the reference is then the caller’s business, which is also what makes a sidecar-assets layout possible.
DataUri
Inline the bytes as a data: URI, producing a self-contained file.
Base64 costs about a third more than the raw bytes, so a document with
large photographs produces a correspondingly large .html.
Omit
Drop images entirely, keeping their alt text as the accessible fallback.
Trait Implementations§
Source§impl Clone for HtmlImageMode
impl Clone for HtmlImageMode
Source§fn clone(&self) -> HtmlImageMode
fn clone(&self) -> HtmlImageMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more