Open kvid opened 1 year ago
It's described in #189 that Graphviz doesn't support base64-encoded images, so we probably would need to decode them into temporary image files in the preparation phase - and optionally delete it again in a final clean-up step when no longer needed. That will also be good for the aspect_ratio()
function.
Two possible ways to obtain this:
image.src
to be a base64-encoded image prefixed with e.g. "data:image/png;base64, " as an optional alternative to a filename - similar to what is allowed in HTML, as described in https://github.com/wireviz/WireViz/pull/189#issuecomment-720104657. This option is simple and doesn't change any input YAML syntax. Inheritance might be used for space efficiency when the same image is used several places in the harness.images
section containing a dict with image filenames as keys and base64-encoded images as values (the prefix mentioned above is probably also needed here to specify image format).This option is more space efficient when the same image is used several places in the harness.This option might also enable overriding the file system when needed.attachments
section to also enable embedding other files than images, e.g. HTML template files or some other external files we might support in the future.A functionality like this might help in use cases where separate image files can cause problems, like in #233 and #320.