I think there should be a command-line option to inline all <image>s (including but not limited to those specified by just an image filename), as the resulting SVG is probably what people usually want (unless immediately converting to PDF or PNG, where they are inlined anyway, so why bother being small in the intermediate file?). Indeed, I think this option should be the default, and there's a command-line option to not inline images.
This was originally discussed in #10, and came up again in puuull.coffee where @diomidov wrote the following code to inline images in a CoffeeScript mapping file:
We might want to deduplicate <image>s that refer to a common filename (but may be included in multiple symbols) via another level of <symbol>s. We could even consider doing this deduplication for inlined SVG (included via filenames), e.g. if blank and space both get mapped to blank.svg -- less clear this is worth it, though. (This aspect is replaced by #50.)
In our automatic bbox code, it'd also be nice to handle <image>s, ideally also with transform:scale(...) set, so that we can easily include images at different sizes (and with this change, have them inlined).
I think there should be a command-line option to inline all
<image>
s (including but not limited to those specified by just an image filename), as the resulting SVG is probably what people usually want (unless immediately converting to PDF or PNG, where they are inlined anyway, so why bother being small in the intermediate file?). Indeed, I think this option should be the default, and there's a command-line option to not inline images.This was originally discussed in #10, and came up again in
puuull.coffee
where @diomidov wrote the following code to inline images in a CoffeeScript mapping file:We might want to deduplicate
<image>
s that refer to a common filename (but may be included in multiple symbols) via another level of<symbol>
s.We could even consider doing this deduplication for inlined SVG (included via filenames), e.g. if blank and space both get mapped to(This aspect is replaced by #50.)blank.svg
-- less clear this is worth it, though.In our automatic bbox code, it'd also be nice to handle
<image>
s, ideally also withtransform:scale(...)
set, so that we can easily include images at different sizes (and with this change, have them inlined).