[sword-devel] Embedded figures : supported image formats and URI schemes ? Data URIs ?
Arnaud Vié
unas.zole+avie at gmail.com
Mon Oct 27 17:22:28 EDT 2025
Thanks DM for your answer !
I went and double checked the source code to see what kind of
transformations were done when building the HTML output, and I guess data
URIs won't work.
In JSword, the "html5.xsl" stylesheet prepends a baseUrl to the figure src,
before printing it into the img src.
In libsword, the "osisxhtml.cpp" filter hardcodes the "file:" protocol in
the generated img tag.
Unless I misunderstood something, I guess it does mean that only local
files in the module are supported at rendering time.
If we wanted to support data URIs in the source OSIS, it would have to be
handled by osis2mod (which would have to decode the data URI, generate a
file from it and write it in the module).
Regarding the image format, I don't see any restriction, so I suppose it
depends on the HTML rendering engine that is used behind the scenes - but
most common formats should be supported.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://crosswire.org/pipermail/sword-devel/attachments/20251027/bede25be/attachment.htm>
More information about the sword-devel
mailing list